Rsync backup with X days retention

rsync is run on backup server, that login to remote servers and backup.

Add following code

Repeat the rsync/echo lines for each server you need to backup.

We exclude some of the files from backup, this is specified in .rsync-exclude file.

Run it with cronjob

Backup Rotation

We rotate backup, so we have 20 days of backups. To do this, run cronjob

Create script

With following content

Here you need to add a folder for each server on line PATHES.

Here is content of excludes.txt

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *