📦Backup your node
Node runners need to keep consistent backups of their node/.config/store
folder after v2.0
But in case you lose your store folder, and you need to relaunch the node, you will not lose your rewards or your prover priority slot (this only applies to rewards accumulated after v2.0).
A good practice is to backup the entire node/.config/
folder, which contains the store folder, the node keys files, and some necessary files if you have to import the node to a different machine.
Personally, I do backup the entire node/.config/
folder, but I DO NOT back up my keys.yml and config.yml files with it, for security. Instead, I back up those files locally (since they just need to be backed up once (see Backup your private keys).
How to back up?
If you have set up your server with RAID 1, you are already backing up all your data on your second disk. Still, ensure your provider offers reliable support in case of need.
If you are using CherryServers, they already provide backup storage by default, and you can set up a cronjob to back up your store folder every hour (they will assist you if needed).
If you don't have many nodes, you could manually back up your store folder once a day.
There are also more sophisticated methods to create automatic backups on Linux, but you need to have expertise in this area.
Back up automatically on Storj
I created a script to set up automatic backups on StorJ.
Before using the script, you need to create a bucket specific to Quilibrium and public/private keys to read/write in this specific bucket.
To create your Keys on StorJ click on "Access Keys" in your left menu, then choose "S3 Credentials", and select the various options you want (suggested: read/write on a specific bucket).
I like StorJ more than Amazon AWS, it is more user-friendly, cheaper, and in my opinion more secure.
The script allows you to also back up your cronjobs and any custom script that you have in the /root/scripts
folder
If you are ready, you can use the script by running this:
Follow the Safety checks before running this script in your server
Restore a backup hosted on StorJ
I also made another script to restore your backup. It will only work if you backed up your entire .config
folder via the script above.
I recommend you to install the Q.One - Node Quickstart Menu where you will find both options (Backup and Restore). Or you can run the restore script directly with this command:
Troubleshooting
If after running the script, your backups do not work, here are some things you can check.
Check your cronjobs with crontab -l
they should begin with rclone and have the source and target path set correctly. You can manually edit them with crontab -e
, but be careful.
Check the rclone configs, run nano ~/.config/rclone/rclone.conf.
They should look something like this:
If up until this point everything looks correct, you may want to check your StorJ account and see if you are using the correct keys to access the bucket that you have set in your cronjobs.
Backing up your whole .config folder
If you have run the previous version of the script (before 15.06.2024 13.30 UTC), your cronjob is set to back up only the store folder. Since it seems now better to back up the whole .config folder, here is what you can do.
Automatic method (slower but easier):
Run again the backup script provided above and follow the procedure again from the beginning. This will set up a new backup for you for the entire .config
folder.
Manual method (faster but requires experience with terminal commands)
Open your crontab with crontab -e
Find the crontab that begins with rclone sync --transfers 10 --checkers 20...
, move the cursor there and pres CTRL +K to delete it.
Now copy this whole command
Change bucket
and folder
with your StorJ bucket name and the target folder name.
Paste (simply right click after copying) the entire code in the crontab screen that you previously opened.
Save with CTRL + X, then Y, then ENTER
Now this new cronjob will backup your entire config folder every 1 hour, except for your keys.yml and config.yml, which I recommend backing up locally for security. If you want to back up those files as well, simply delete --filter '- keys.yml' --filter '- config.yml'
from the cronjob command above.
FINAL STEP! Delete your storj:/your_bucket/your_folder/store/
folder from StorJ
storj:/your_bucket/your_folder/store/
folder from StorJThe new backup method stores your backups in storj:/your_bucket/your_folder/.config/
, so now you will have an extra folder storj:/your_bucket/your_folder/store/
that you can delete.
Last updated