For the test, I install fsbackup in Ubuntu Server and Debian.
Switch to the root user:
su
Download the archive from fsbackup and unpack it:
cd /tmp wget https://www.opennet.ru/dev/fsbackup/src/fsbackup-1.2pl2.tar.gz tar -xvzf ./fsbackup-1.2pl2.tar.gz
Run the installation script:
cd fsbackup-1.2pl2 ./install.pl
fsbackup will be installed in the default directory /usr/local/fsbackup.
After that, you need to edit the file create_backup.sh:
nano /usr/local/fsbackup/create_backup.sh
In which to specify the configuration file or to leave existing and edit them:
nano /usr/local/fsbackup/cfg_example nano /usr/local/fsbackup/cfg_example_local nano /usr/local/fsbackup/cfg_example_users nano /usr/local/fsbackup/cfg_example_root
If necessary, also edit the scripts in the /usr/local/fsbackup/scripts directory.
Let’s create a directory in which the backup copies will be stored:
mkdir /usr/local/fsbackup/archive
Open the text editor in the scheduler:
nano /etc/crontab
And add a line, thereby scheduling the execution of the script and the creation of backups every day at 4:15 am:
15 4 * * * /usr/local/fsbackup/create_backup.sh| mail -s"`uname -n` backup report" root