Local & remote (SSH) incremental backup for your servers!
Backup files(directories) listed in backup_list file, excluding files listed in backup_exclude file.
backup_exclude has higher priority than backup_list file.
Configurations are at backup_settings.sh. After setting the configuration file, executing backup.sh will back up your system.
Directory structures are preserved, after the root backup directory. When all files are backed up, it will touch the root backup directory so that it will store the backup date.
You can run the backup script periodically using crontab. For example,
10 3 */3 * * /path/to/backup.sh
will run backup.sh every 3 days at 3:10 AM.
The backup partition should be mounted under /root so none of the other users can access (and modify) the backup. If you want to expose the backup to normal users, consider binding the mount directory with read-only attribute. You need a recent kernel to do so, and Ubuntu 18.04 and 20.04 seem to work well.
mount --bind -o ro /root/backup /disk/backupOr, in /etc/fstab,
/root/backup /disk/backup none bind,ro 0 0
You can report the success or error log to Telegram and/or Slack!
Make key.ini similarily to key.ini.template. Enable reporting on backup_settings.sh.
That's it!