Skip to content

Managing your Quilibrium Node

1. Backing up your .config folder, daily

For this objective, we will not reinvent the wheels, but leverage on what the community has built for the community.

A. Activate your included backup storage.

Go to the Cherry Servers portal (link) and login to your Cherry Servers account. Go to your Servers. Select the server you want to activate your included backup storage for. On your server's overview page, click the Backup Storage sub-menu option under Storages found on the left sidebar.

Click Backup Storage

Click the Activate + blue button found on the upper-right corner of the page.

Click Activate+

Wait until the Included Backup Storage 100 GB gets displayed on the Plan field on the pop-up dialog that appears. Then click Activate.

Click Activate

You will see that the backup storage is now on Provisioning State. You will have to wait around two (2) to three (3) minutes for this State to change from Provisioning to Active. Once it is in an Active state, you should be able to see the storage private and public IP addresses, as well as Service Configuration details on how to connect to the backup storage via FTP, SMB, and NFS protocols.

Under # Sample instructions: section, the username and password will be displayed on plaintext. and further instructions to connect are displayed further depending on the selected protocol tab (FTP, SMB or NFS).

B. Copy and paste the code block below.

This quilup.sh script is created by @Lili of CherryServers. We will modify the script a bit and perform the following changes:

  1. Change the folder that the script will backup from node to .config.
  2. Exclude config.yml and keys.yml from files to be backed up using an exclusion file called exclude_file.txt

Run the code block below.

cd ~
wget https://snapshots.cherryservers.com/quilup.sh
chmod +x quilup.sh
 
# creating an exclude-file.txt
echo -e "# a sample exclude rule file\nconfig.yml\nkeys.yml" >> exclude_file.txt
 
# modifying the initial rclone copy command to only clone .config folder, and exclude config.yml and keys.yml
sed -i 's/rclone copy --transfers 10 --checkers 20 --disable-http2 --retries 1 \/$HOME\/ceremonyclient\/node ftp:\/quil\/$hostname\/node --stats-one-line --stats=1s --log-file=\/tmp\/rclone.log/rclone copy --transfers 10 --checkers 20 --disable-http2 --retries 1 \/$HOME\/ceremonyclient\/node\/.config ftp:\/quil\/$hostname\/config --stats-one-line --stats=1s --log-file=\/tmp\/rclone.log --exclude-from \/$HOME\/exclude_file.txt/g' ~/quilup.sh
 
# modifying the crontab rclone copy command to only clone .config folder, and exclude config.yml and keys.yml
sed -i 's/$HOME\/ceremonyclient\/node ftp:\/quil\/$hostname\/node/$HOME\/ceremonyclient\/node\/.config ftp:\/quil\/$hostname\/config --exclude-from \/$HOME\/exclude_file.txt/g' ~/quilup.sh
 
# adding 3rd question if user wants to mount the ftp folder to ~/config-backup location. if y, then execute mount
sed -i 's/echo "🕒 cron job added 🕒"/echo "🕒 cron job added 🕒"\nfi\n\n#ask user if they want to mount the ftp folder\nread -p "do you want to mount ftp:\/quil\/$hostname\/config to ~\/config-backup folder? (y\/n): " mount_config\n\nif [ "$mount_config" == "y" ]; then\n  if [ "$backup_choice" == "1" ]; then\n    echo "... installing nfs-common package first (in case of Ubuntu OS)"\n    apt -y install nfs-common\n    mkdir ~\/config-backup\n    mount -t nfs $ftp_host:\/export\/backup\/quil\/$hostname\/config ~\/config-backup\n    echo "🕒 ftp folder mounted to ~\/config-backup\/ 🕒"\n    echo "listing \/root\/config-backup\/ contents..."\n    echo "🕒 ftp folder mounted to ~\/config-backup\/ 🕒"\n    echo "listing \/root\/config-backup\/ contents..."\n    find "\/root\/config-backup" -type f -exec echo Found file {} \\;\n  elif [ "$backup_choice" == "2" ]; then\n    echo "im sorry. mounting instructions were not added for storj backup choice"\n  fi/g' ~/quilup.sh
 
# execute quilup.sh
./quilup.sh

C. Follow the script instructions.

Press 1 to select 🍒 Cherry Servers Backup Storage 🍒.

Press 1

Type your backup storage IP address and FTP password next.

Type in IP addr and FTP password

After entering your password, this will automatically proceed with the steps described above.

Steps taken

The script will ask you next if you want to add the rclone sync task to crontab job to run every 12 hours? Type y to answer yes.

Setup cron job

The backup script execution is now completed.

D. Verify mounted folder ~/config-backup

Go to the config-backup folder.

cd ~/config-backup
ls

This should represent your node's backup files located in your backup storage.

Backed up files listed below. Backed up files