Bitcoin Forum
April 26, 2018, 08:24:27 PM *
News: Latest stable version of Bitcoin Core: 0.16.0  [Torrent]. (New!)
   Home   Help Search Donate Login Register  
Pages: [1]
Author Topic: Managing and protecting my wallets  (Read 769 times)
Offline Offline

Activity: 89
Merit: 10

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

So, I was trying to participate in this thread:, 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

require 'rubygems'
require 'zip/zip'  #

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

zip ="#{backup_folder}/#{backup_zip}", true)
zip.get_output_stream(backup_wallet) { |f| f.puts("#{backup_folder}/#{backup_wallet}")) }
zip.get_output_stream('info.txt') { |f| f.puts(info) }


This script is based on a bash backup script found here: 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?
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Offline Offline

Activity: 19
Merit: 0

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

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]
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!