Home » Blog » Software Development » Rotating Backup with Rsync

Rotating Backup with Rsync

I wanted to have a little backup script running as a cronjob that efficiently generates a rotating backup for each day of the week.

I came up with a script, that uses rsync together with its --link-dest parameter that does exactly this:

[gist id=3051628]

You just have to give a list of folders to backup to the BACKUPPATHS variable together with a target path for each folder to backup in the TARGETPATH variable. The --link-dest parameter causes rsync to create hard links instead of copies of a file, if no changes were made to that file. This does not occupy additional hard disk space.

Check Also

Xarcade2Jstick supports new Tri-Mode Tanksticks

X-Arcade Dual Joystick If you happen to own an X-Arcade Tankstick this post might be …

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

We use Cookies and similar technology to collect and analyse information about the users of this website. We use this information to enhance the content, advertising and other services available on the site. Please click ‘Accept cookies’ to consent to the use of this technology by petrockblock. You can manage your preferences at any time by visiting our Cookies Policy page.