Files Backed Up
Zend
wallet.dat, onion_private_key*
Nodetracker
config.json
Log into your node using your RSA key auth
Set the $FQDN environment variable - you will need to type this command and change <FQDN> to the Fully-Qualified Domain Name of your node
FQDN=<FQDN> |
Stop zend and the tracker if you're using monit and PM2
sudo monit stop zend && pm2 stop 0 |
Stop zend and the tracker if you're using systemd
sudo systemctl stop zend zentracker |
Remove '#' from the line: '#7z a tor.7z ~/.zen/onion_private_key', if using tor
cat <<EOF > ~/backup.sh #!/bin/bash #Create a temp Directory mkdir ~/.temp && cd ~/.temp #Archive zend file(s) 7z a wallet.7z ~/.zen/wallet.dat #7z a tor.7z ~/.zen/onion_private_key #Archive nodetracker config file 7z a config.7z ~/nodetracker/config/config.json cd ~/ 7z a -p backup.$FQDN.7z ~/.temp #Erase Temporary Files rm -rf ~/.temp EOF |
Make the backup script executable
chmod u+x ~/backup.sh |
Install 7zip
sudo apt install p7zip-full -y |
Run the backup script and create and confirm a password when prompted
~/backup.sh |
Start zend and the tracker if you're using monit and PM2
sudo monit start zend && pm2 start 0 |
Start zend and the tracker if you're using systemd
sudo systemctl start zend zentracker |
Check the sha256 hash of the backup file and re-check the hash after transferring to your local machine
sha256sum backup.$FQDN.7z |
scp <USER>@<FQDN>:backup.<FQDN>.7z ~/ |
Check the sha256 hash of the backup file and verify it is the same as on the node
shasum -a 256 ~/backup.<FQDN>.7z |
scp <USER>@<FQDN>:backup.<FQDN>.7z ~/ |
Check the sha256 hash of the backup file and verify it is the same as on the node
sha256sum ~/backup.<FQDN>.7z |
Store the file to a secure location, such as an encrypted thumb drive