Automated backups using rsync

RSyncBackup is the Python utility that I wrote to perform automatic backups using the rsync command.  Rsync has many different uses but is particularly suitable for performng backups from one form of online storage to another, either over a network or on a local machine with multiple drives.

RSyncBackup consists of two parts:

  • is the module which contains all of the logic of how to use rsync to perform backups.
  • is an example script showing some of the ways in which RSyncBackup can be used.

By using RSyncBackup you get the following features (all of which are optional):

  • Incremental archives containing the old versions of files.  For example when /backup/current/fileOne.txt has changed the old version can be found in /backup/archives/2003/05/26/fileOne.txt.
  • Removal of old archives to free up space.
  • Logging results of backup to a file.
  • Send email if an error occurs.
  • Test Run mode to see what your script will try to do.
  • Can be run frequently, but only backup after a specified time has ellapsed since the last backup.  This is useful on machines which are not switched on all the time.

NOTE: RSyncBackup use the Python logging library (Now part of Python 2.3)


Version 1.3

When trimming archives use os.remove on all paths that are not directories.  This allows special files such as sockets to be deleted.

Version 1.2

This release includes a proper LICENSE file and the API documentation.

Version 1.1

This release fixes a problem where symbolic links would not be deleted when the archives were trimmed.

Last Modified: Sun, 01 Feb 2015 10:59:33 CET

Made with PubTal 3.5

Copyright 2020 Colin Stewart

Email: colin at