Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: jostmey on August 09, 2011, 06:41:30 PM



Title: Most graceful way to close bitcoin client
Post by: jostmey on August 09, 2011, 06:41:30 PM
What is the most graceful way to close the bitcoin client software from a shell script?

I ask because I always want to leave the client running in the background, but periodically I will need to automatically close the program and backup the wallet file.


Title: Re: Most graceful way to close bitcoin client
Post by: jimbo77 on August 09, 2011, 06:50:37 PM
kill should be fine.


Title: Re: Most graceful way to close bitcoin client
Post by: JoelKatz on August 09, 2011, 06:54:19 PM
You know the client has a command to backup the wallet, right?


Title: Re: Most graceful way to close bitcoin client
Post by: jostmey on August 10, 2011, 03:31:27 AM
You know the client has a command to backup the wallet, right?


How do I call the command to backup the wallet file from an active process? And isn't the backup command only for the daemon, or is it for the GUI version too?


Title: Re: Most graceful way to close bitcoin client
Post by: EricJ2190 on August 10, 2011, 04:06:11 AM
You know the client has a command to backup the wallet, right?


How do I call the command to backup the wallet file from an active process? And isn't the backup command only for the daemon, or is it for the GUI version too?

The GUI will accept commands too if run with the "-server" option or if you specify "server=1" in bitcoin.conf. You can then use the "backupwallet" JSON-RPC command to backup the wallet. From the command-line, that would be "bitcoind backupwallet /output/file".