Bitcoin Forum
April 19, 2024, 10:18:42 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Managing and protecting my wallets  (Read 886 times)
jamoes (OP)
Member
**
Offline Offline

Activity: 89
Merit: 10


View Profile
June 12, 2011, 01:51:22 PM
 #1

So, I was trying to participate in this thread: http://forum.bitcoin.org/index.php?topic=15068.0, and I couldn't find the reply button. After a few minutes, I realized I was relegated to this ghetto. So, I figured I'd post what I was going to post here.

Here's the ruby script I use to backup my wallet.dat file

Code:
require 'rubygems'
require 'zip/zip'  # http://rubyzip.sourceforge.net/

now = Time.now

wallet_location = '~/Library/Application Support/Bitcoin/wallet.dat'
backup_folder = '~/backups/bitcoin'

puts "Please ensure the Bitcoin client is not running"
print "Wallet name: "
wallet_name = gets.strip

backup_zip = "wallet-backup_#{wallet_name}_#{now.strftime('%Y-%m-%d')}_#{now.to_i}.zip"
backup_wallet = "wallet.dat.#{now.strftime('%Y-%m-%d')}.#{wallet_name}.aes-256-cbc"

md5 = `md5 -l -n #{wallet_location}`.strip

`openssl aes-256-cbc -a -salt -in #{wallet_location} -out #{backup_folder}/#{backup_wallet}`


info = <<EOF
Wallet MD5: #{md5}
Wallet Name: #{wallet_name}

Decryption command:
openssl aes-256-cbc -d -a -salt -in #{backup_wallet} -out wallet.dat
EOF

zip = Zip::ZipFile.open("#{backup_folder}/#{backup_zip}", true)
zip.get_output_stream(backup_wallet) { |f| f.puts(File.read("#{backup_folder}/#{backup_wallet}")) }
zip.get_output_stream('info.txt') { |f| f.puts(info) }
zip.close

File.delete("#{backup_folder}/#{backup_wallet}")

This script is based on a bash backup script found here: https://github.com/mrkva/BitcoinBackup.sh/blob/master/BitcoinBackup.sh I prefer ruby though, so I re-wrote it.

This script encrypts and backs up my wallet. It includes instructions of how to decrypt it, and an md5 hash of the decrypted wallet for verification purposes. After running the script, I upload the wallet to gmail and save it to a backup disk. I also verify that I can fully decrypt and access the wallet by decrypting it on a different computer with a fresh install of bitcoins.

What processes to others use to manage their wallet backups?
Even if you use Bitcoin through Tor, the way transactions are handled by the network makes anonymity difficult to achieve. Do not expect your transactions to be anonymous unless you really know what you're doing.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713565122
Hero Member
*
Offline Offline

Posts: 1713565122

View Profile Personal Message (Offline)

Ignore
1713565122
Reply with quote  #2

1713565122
Report to moderator
1713565122
Hero Member
*
Offline Offline

Posts: 1713565122

View Profile Personal Message (Offline)

Ignore
1713565122
Reply with quote  #2

1713565122
Report to moderator
1713565122
Hero Member
*
Offline Offline

Posts: 1713565122

View Profile Personal Message (Offline)

Ignore
1713565122
Reply with quote  #2

1713565122
Report to moderator
Ruudsy
Newbie
*
Offline Offline

Activity: 19
Merit: 0


View Profile
June 13, 2011, 01:18:43 PM
 #2

on my win7 mashine i use a strange combination of the taskplanner, cobian backup and truecrypt. the taskplanner will start an stop the bitcoin exe, cobian backup puts the wallet.dat into a filecontainer created by truecrypt. this container is copied to a server by cobian backup.
its not too strange ;-) isnt it?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!