I will use rclone from https://rclone to backup my backup.org In this specific case I will use
https://mega.nz
and the appropriate configuration to copy files from the server to mega.nz. If you donβt have an account there, you can create one. Good morning everyone gets 50 GB of space for free.
Please note that at the moment there is a problem with 2FA for mega. Trying to compile an application from the source code by following the instructions from this page
https://github.com/meganz/MEGAsync
ends in an error. This is due to a compiler error, which in this case has too little memory, 128 MB RAM, 170 MB swap and too little CPU resources to complete the compilation properly. Process cc1plus is killed (kill) and the compilation of Crypto++ fails.
We need curl
CentOS
1
sudo yum install curl
Debian/Ubuntu
1
sudo apt-get install curl
or
1
sudo apt install curl
Next, execute the following command:
1
curl https://rclone.org/install.sh | sudo bash
Log in with increased privileges as a sudoers user.
1
sudo -i
Run rclone configuration with a command:
1
rclone config
Create a configuration file with a connection to your mega.nz
Choose n as a new remote)
Create a friendly name, e.g. mega or remote.
Create an 18 item, i.e. type the digits 18.
Give your login and password to your account in mega.nz
Next, we select n, because we do not want an advanced configuration, which I will write about another time.
Confirm our configuration with the letter y.
A at the very end we select q to leave the configuration.
Check now that the configuration is working.
1
rclone lsd mega:
If everything went well, you will be logged in to our account. On mega you can manually create a folder called backup. Then you can manually copy files to this folder using the lower command:
1
rclone copy /home/user mega:backup
But why bother? You can write yourself a script.
1
2
cd /home/user
vi backup.sh
Press the insert on the keyboard (ins) and paste the following content:
In order for a script to be executable, it must be given appropriate permissions.
1
chmod +x backup.sh
Now you can execute the script manually:
1
./backup.sh
If you want to automate this fairly lengthy process, add a task to the cron that will execute this script for you.If you want to automate this fairly lengthy process, add a task to the cron that will execute this script for you.If you want to automate this fairly lengthy process, add a task to the cron that will execute this script for you.
1
crontab -e
Press the insert (ins) and paste it:
1
0004 * * * /bin/bash /home/user/backup.sh
Press Esc, enter :x and press Enter.
The script will be executed at 4 a.m. every 24 hours.
Finally, Iβd like to make a final comment. The proc and sys directories will not allow you to make a copy, because they have files that are in use by the server, and more specifically by its processes.