Rsbackup backup Users Guide

rsbackup is an application that has grown out of the backup service scripts designed and implemented by Daily Data to meet the needs of a reliable backup service for our clients. rsbackup is the client for this suite that can be used without the server portion if desired.

Acquiring rsbackup

rsbackup is available in either source form (Perl Script) or as a Debian Package.


I'm still working on this. Check back in a day or two rod, 20080626

Daily Data Debian Repository

We have a trivial repository set up for this package, and intend to add additional packages as the become mature (rsbackup was initially developed in 2004 (I think), and is currently deployed on several servers, so we consider it mature). Add the following to /etc/apt/sources.list for access to this repository:

# Daily Data Repository
deb /

Obviously, the comments are not necessary.

Afterwards, execute the following commands to download and install rsbackup:

apt-get update
apt-get install rsbackup

All of our documentation to date has been in html or internal, so the man pages are not quite up to speed.

This will install three non-documentation files:

/etc/rsbackup/rsbackup.conf  -- main configuration file; edit this
/etc/cron.d/rsbackup             -- cron control; modify to set the time and error notification
/usr/sbin/rsbackup               -- executable

all set with defaults. The latter (the executable) is hopefully unlikely to require modification, but feel free to do so. If you find changes that help, contact us and we'll be happy to review it for inclusion.

You can change the cron file if you want the process executed on a different schedule than the default -- 1am every morning -- or the recipient of errors which is set to root by default.

You should definitely edit /etc/rsbackup/rsbackup.conf. While it makes some logical assumptions for the default configurations, it would be highly unlikely that all of them are correct in most cases. The configuration file is pretty well documented, so I'll not waste time on it here.

Note: the configuration file is backwards compatible, so computers which used previous versions that had configuration files (look for /root/bin/backup.conf) can simply copy those files to /etc/rsbackup/rsbackup.conf, though the new configuration file format is much better laid out and commented.

Testing the Installation

In the configuration file, the first definition is:


which puts the program in test mode. With this in place, execute the program by entering the command rsbackup from the command line. No actions will be taken, but the commands that would be normally executed are printed on stdout. You can review them for correctness. After you are satsified with the results of this test, change the line to read:


To do a dry run of the backup, ensure the following line reads

 $CONTROL{'--dry-run'} = sub { return 1; } ;

which will cause an rsync dry run to be executed. All commands are executed except files are not actually transferred to the destination. Depending upon connection speed, processor speed, and the number of files, this can take from a few seconds to, literally, hours. For a test run, you might also modify the @DIRS_TO_BACKUP array, removing all but a small directory, such as /etc:

@DIRS_TO_BACKUP = ('/etc'); 

At this point, move to the root directory (or any user directory) and run rsbackup. I generally place it in the background as follows:

cd /root
nohup rsbackup &

which will run the program in the background even if you log off the machine. To watch the progress of the program, you can watch the log file as it grows. It is, by default, located in /root/backup_logs/ and have a name of the form while rsync is running. Thus, the following command allows you to watch the progress:

tail -f /root/backup_logs/

where yyyymmdd is the current date, and is the name of your computer (or whatever you changed the variable $MY_NAME to in the configuration file).

Once the script is done, this file will be gzipped, and you will see no further action on the log file (it will have disappeared).


Last update:
2014-10-29 07:25
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.