Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: NewLibertyStandard on July 11, 2010, 06:25:55 AM



Title: Request: Send to File & Backup/Restore
Post by: NewLibertyStandard on July 11, 2010, 06:25:55 AM
It would be very useful if Bitcoin could send bitcoins to a file which could then be received by whichever client accepted it first. The sending and receiving would be broadcast to other nodes, just like any other transaction. Ideally the number of bitcoins would be saved within the name of the file. Something like b250c13.btc for ฿250.13.

It would also be nice if Bitcoin had a backup feature which would backup a user's wallet and/or his block chain into a single file, perhaps with the date included in the name of the backup. Ideally it would not be broadcast to other nodes. When it's imported, Bitcoin could ask whether it should overwrite the current wallet or merge with it.

I've heard ideas like these before, most recently in an unrelated thread (http://bitcointalk.org/index.php?topic=168.0), but I thought they deserved their own thread.


Title: Re: Request: Send to File & Backup/Restore
Post by: Bitcoiner on July 11, 2010, 07:13:58 PM
Quote
5) Along with #4, make sure to have a super-simple backup feature.  I know I can go into my documents and settings\application data\bitcoin\whatever to make a backup of my money, but my grandma won't bother doing that.  My grandma knows that if she opens her drawer, she's got her 100's stashed in there for a rainy day - that is her 'backup'.  Make the 'backup' feature - say, perhaps, to a flash drive - as idiot proof as possible. 


A backup function would be very nice! A button to click backup, and then you can choose the directory (or usb flash drive or whatever)

Would be very convenient for the average user to back up their "wealth" instead of browsing the app data directory and fishing it out.

Second the motion!

Agreed; coins should be exportable into a flat file, which could then be encrypted using a tool like KeePass.


Title: Re: Request: Send to File & Backup/Restore
Post by: Bitcoiner on July 11, 2010, 07:46:38 PM
I'd also like to add that the wallet itself should be auto-backed up every now and then. It would suck if someone lost all their coins because their computer shut down while Bitcoin was in the middle of making a write.


Title: Re: Request: Send to File & Backup/Restore
Post by: The Madhatter on July 11, 2010, 08:19:37 PM
I'll share some of my "secret backup sauce". Some of you might find it helpful.

I simply use shell scripts on a cron that make hourly or daily (depends on the velocity of transactions) rotating 90-day snapshots of my entire ~/.bitcoin directory (after I truncate the debug.log; it gets quite huge). The snaps are compressed, PGP'd, and uploaded via scp to a pile of servers I have all over the world. I've never lost a coin yet! :)

End users are notoriously bad for backing things up.

Even making the wallet.dat file easier to locate (talking about windows here) and urging the user to make copies of it to a USB thumbdrive or whatever would help a lot. Perhaps the place where the wallet.dat is stored on windows could be standardized? I personally know of 2 people who have lost their wallet.dat file because they backed up the wrong folders on windows before a wipe+reinstall. This kind of frustration will only lead to people dropping the whole concept of Bitcoin.


Title: Re: Request: Send to File & Backup/Restore
Post by: laszlo on July 11, 2010, 11:36:23 PM
The windows thing is a function of having different operating system versions.. on Vista at least it goes into this Roaming directory, because they reorganized it and wxWidgets is just using the OS standard place.  There is a -datadir option you can use to keep it on the desktop or whatever.  I believe if you use the token %APPDATA% in your script, or $APPDATA if you're using cygwin/msys, then you will always have the right place regardless of XP/Vista.

So something simple like a scheduled task on windows or a cron job on another system like Mac OS or a BSD/Linux distro..

Windows batch file style with another windows machine as a file share, going from the bitcoin host to a file share:
Code:
SET DTS=%DATE:~4%
SET DTS=%DTS:/=_%
SET DTS=%DTS%-%TIME::=.%

xcopy /E "%APPDATA%\Bitcoin" "\\myserver\backup\Bitcoin-%DTS%"

Shell script style, still initiated from the bitcoin machine - set up public key auth so no password is needed first
Code:
DATE="/bin/date"
DATESTR="$(${DATE} +%Y-%m-%d-%H%M)"

scp -r "$APPDATA/Bitcoin" "user@host:backup/Bitcoin-${DATESTR}"


Title: Re: Request: Send to File & Backup/Restore
Post by: TheOddShot on July 12, 2010, 04:33:23 AM
We need, in my opinion, some method to prevent fraudulent backups by unauthorized people who might gain physical access to the computer.

A suggestion: the client requires a password when started. This same password must be given to initiate a backup, and the password is saved in the backup file.  To restore a backup, you need the password given when the backup was made.

This means that a person who has physical access to my computer cannot start the bitcoin client without my password (so they can't even see my balance). If the client is already running, they can't initiate a backup  without my password (maybe the password should also be used to validate any spending too, but that's another matter) and, if they find a backup I've already made, they can't copy it & load it into their computer without my password.

This is so necessary, and so basic, I can't believe the client has not had it from day one.

Cheers,

Trevor


Title: Re: Request: Send to File & Backup/Restore
Post by: lachesis on July 12, 2010, 05:08:20 AM
I agree that the wallet should be kept encrypted on disk and only copied into RAM unencrypted. +1


Title: Re: Request: Send to File & Backup/Restore
Post by: Anonymous on July 12, 2010, 01:18:17 PM
What about implementing yubikey support for logging in to the client?
http://www.yubico.com/products/description/ (http://www.yubico.com/products/description/)