Using an external drive to auto-backup your wallet


#1

Hello Pivians!

I will show you how to utilize the new autobackup function introduced with 3.1.0. I only use command line ssh to your staking wallet (e.g. a pi3). I assume that you have basic knowledge of linux but this should still be rather noob-friendly (because otherwise you would not need a guide :slight_smile: )

  1. Open your ssh terminal to your remote server running the stake wallet.
  2. Close the wallet with ~/pivx-cli stop
  3. Wait until wallet is closed (check with “top” command until the pivx-shutdown process is closed)
  4. Insert the USB drive (FAT32) to your raspberry pi3.
  5. Check the name of the usb drive by “sudo fdisk -l”.
  6. Look for the name of the device e.g. /dev/sda1 . If you have trouble finding it make this step before inserting the usb and then after.
  7. Type: “sudo mount /dev/sda1 /media/usb -o dmask=000,fmask=111”. This mounts your device (in this case sda1) into /media/usb. The rest makes sure that you have the necessary permissions as FAT32 and NTFS cannot be changed after mount.
  8. Navigate to your .pivx folder and type “nano pivx.conf”. This opens the pivx.conf.
  9. Add the following to your pivx.conf file:

backuppath=/media/usb/
zpivbackuppath=/media/usb/
custombackupthreshold=10

  1. Make sure that you do not have spaces there (it is different than in the documentary on GitHub). It also says that it can do 10 backups before overwriting the old ones. You can set your preferred value there.
  2. Restart the wallet.
  3. use “…pivx-cli backupwallet ~/Documents”. This creates a manual backup in your Documents folder. At the same time it creates a autobackup on your usb drive. This is not very elegant but it works to check if you set up everything correctly. I am actually not sure about other conditions when it does an autobackup.

This is probably not the best way to do it, but it works for me :slight_smile: I think it is very important to use this new feature to protect yourself from hardware or other failures.

Cheers
TheEconomist