gridcoin-community / Gridcoin-Research

Gridcoin-Research
MIT License
588 stars 173 forks source link

Wallet backup doesn't work as intended since 3.6.2.0 #757

Closed ignition42 closed 6 years ago

ignition42 commented 6 years ago

Since I upgraded to 3.6.2.0 backupwallet command stopped working as it did before. I've read that some changes has been made in that version. It's a bug or the arguments changed?

From help:

$ ./gridcoinresearchd help backupwallet
backupwallet <destination>
Safely copies wallet.dat to destination, which can be a directory or a path with filename.

Then:

$ ./gridcoinresearchd backupwallet /home/grid/wallet_backup.dat
$ ls /home/grid/wallet_backup.dat
ls: cannot access /home/grid/wallet_backup.dat: No such file or directory

Regards

tomasbrod commented 6 years ago

@Foggyx420 ? Last time I executed the command without arguments it created the backup in walletbackups/ folder inside the data directory.

ignition42 commented 6 years ago

@tomasbrod Is not the expected behaviour, as help says you should be able to specify the destination.

When I execute it without arguments it fails:

$ ./gridcoinresearchd backupwallet
error: {"code":-1,"message":"backupwallet <destination>\nSafely copies wallet.dat to destination, which can be a directory or a path with filename."}

But doing it with ./gridcoinresearchd execute backupwallet makes the backup of the config and wallet inside ~/.GridcoinResearch/walletbackups/ folder.

The problem is that the previous command is broken now and also breaks compatibility with previous versions and with bitcoin-like wallets too.

I have a script that backs up my bitcoin-like wallets by rcp, and now I will need to change that for gridcoin.

tomasbrod commented 6 years ago

This is a very good point. I notified @Foggyx420 about this issue in my previous message, he is the kvazy-owner of the backup code. Something might be already fixed in the testnet version, but i am not sure.

barton2526 commented 6 years ago

@Foggyx420 Is this fixed?

ignition42 commented 6 years ago

I'm really disappointed but this now this works differently not backwards compatible with bitcoin rpc. Does not accept parameters anymore. So it seems we need to have a different script for gridcoin. Also the new backups system doesn't look like its amazingly better but the problems gridcoin had lately with forks and networks instabilities had gone too far to invest time on make new amazing super backup systems.

./gridcoinresearchd help backupwallet
backupwallet
Backup your wallet and config files.
./gridcoinresearchd backupwallet
{
    "Backup wallet success" : true,
    "Backup config success" : true
}
iFoggz commented 6 years ago

Backup works to backup folder in datadir.

tomasbrod commented 6 years ago

@ib3doya I added a feature request. I understand that it breaks scripts.

ignition42 commented 6 years ago

Thanks @tomasbrod
I cannot understand the reason of this change, to make a new backup system and to break the compatibility... When the network is crazy... There must be a very good reason...

iFoggz commented 6 years ago

Will look into this when have time. Yes backup code changed and some backup functions were reduced into 1. This on my list of things to do once things are stable.