Files Restored
Zend
wallet.dat, onion_private_key*
Nodetracker
config.json
File Transfer Section
- Launch Terminal
- CMD + Space, search 'Terminal' and press <Enter>
Check the sha256 hash of the backup file and re-check the hash after transferring to your node. The following command assumes the "backup.<FQDN>.7z" file is located in "/Users/<USER>/"
Code Block shasum -a 256 ~/backup.<FQDN>.7z
- Enter the following to SCP the backup file into your home directory
- Replace <USER> with your username
- Replace <FQDN> with your fully qualified domain name
The following command assumes the "backup.<FQDN>.7z" file is located in "/Users/<USER>/"
Code Block scp ~/backup.<FQDN>.7z <USER>@<FQDN>:
- Launch Terminal
Check the sha256 hash of the backup file and re-check the hash after transferring to your node. The following command assumes the "backup.<FQDN>.7z" file is located in "/Users/<USER>/"
Code Block sha256sum ~/backup.<FQDN>.7z
Enter the following to SCP the backup file into your home directory
- Replace <USER> with your username
- Replace <FQDN> with your fully qualified domain name
The following command assumes the "backup.<FQDN>.7z" file is located in "/Users/<USER>/"
Code Block scp ~/backup.<FQDN>.7z <USER>@<FQDN>:
- Check the sha256 hash of the backup file and re-check the hash after transferring to your node
- Launch WinSCP
- WinSCP can be downloaded here
- Accept importing PuTTY config, this will also grab your key files for increased security
- Select your node from the list and click login and enter your information
- In the left window pane, navigate the the file named "backup.<FQDN>.7z" and select it
- Click upload and click OK
Create and Execute Restore Script
- 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
Code Block FQDN=<FQDN>
Check the sha256 hash of the backup file and and verify it is the same as on your local machine
Code Block sha256sum backup.$FQDN.7z
Stop zend and the tracker if you're using monit and PM2
Code Block sudo monit stop zend && pm2 stop 0
Stop zend and the tracker if you're using systemd
Code Block sudo systemctl stop zend zentracker
Remove '#' from the line: '#7z x tor.7z -ozen' and '#cp /home/$USER/.temp/zen/onion_private_key /home/$USER/.zen/', if using tor
Code Block cat <<EOF > ~/restore.sh #!/bin/bash #Create a temp Directory mkdir ~/.temp && cd ~/.temp #Extract Encrypted Archive of Backup Files 7z x ~/backup.$FQDN.7z #Extract zend file(s) 7z x ~/.temp/wallet.7z -ozen #7z x ~/.temp/tor.7z -ozen #Extract nodetracker config file 7z x ~/.temp/config.7z -ozen #Copy needed files cpmv ~/home/$USER/.temp/wallet.dat ~/home/$USER/.zen/ cp /home/$USER/.tempmv ~/config.json /home~/$USER/nodetracker/config/ #cp /home/$USER/.temp/#mv ~/onion_private_key /home/$USER~/.zen/ #Erase Temporary Files cd ~/ rm -rf ~/.temp EOF
Make the restore script executable
Code Block chmod u+x ~/restore.sh
Install 7zip
Code Block sudo apt install p7zip-full -y
Run the restore script and create and enter password when prompted
Code Block ~/restore.sh
Restore tor, if installed by creating the following script and executing it, otherwise, proceed to step 11 or 12
Code Block cat <<EOF > ~/tor_script.sh #!/bin/bash sudo sed -i 's/#ControlPort 9051/ControlPort 9051/g' /etc/tor/torrc sudo sed -i 's/#CookieAuthentication 1/CookieAuthentication 1/g' /etc/tor/torrc sudo su -c "echo 'CookieAuthFileGroupReadable 1' >> /etc/tor/torrc" sudo su -c "echo 'LongLivedPorts 9033' >> /etc/tor/torrc" sudo systemctl restart tor.service EOF
Code Block chmod u+x ~/tor_script.sh
Code Block sudo ~/tor_script.sh
Start zend and the tracker if you're using monit and PM2
Code Block sudo monit start zend && pm2 start 0
Start zend and the tracker if you're using systemd
Code Block sudo systemctl start zend zentracker
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|