[sllug-members]: backup crontab script

Lonnie Olson sllug at fungusmovies.com
Wed Mar 4 16:30:30 MST 2009


On Wed, Mar 4, 2009 at 4:24 PM, Lonnie Olson <sllug at fungusmovies.com> wrote:
> On Tue, Mar 3, 2009 at 1:05 PM, Brandon Stout <bms at mscis.org> wrote:
>> A server I'm working on has a script called backup_files_locally.sh that
>> runs daily at 20:00.  Here's the script:
>>
>> sudo rsync -aruvz --delete --delete-after --delete-excluded
>> - --files-from=/usr/local/var/etc/files_to_backup
>> - --exclude-from=/usr/local/var/etc/files_to_not_backup /
>> /usr/local/var/backups/files/$((`date +"%V"` % 3))/

Also, I see you using rsync and keeping date based archives.

Let me introduce you to a wonderful little friend called rsnapshot
(http://rsnapshot.org/)
This tool is simply a frontend to rsync.

"Using rsync and hard links, it is possible to keep multiple, full
backups instantly available. The disk space required is just a little
more than the space of one full backup, plus incrementals. "

Since it hard links non-changed files from the previous backup, it
saves disk space, but more than that, it saves time, gobs of time,
tons of time.  Your method doesn't take advantage of any of the rsync
algorithms for copying only changes.  rsnapshot makes great use of
this, with also providing you multiple versions.

--lonnie


More information about the sllug-members mailing list