rdbackup - backup system based on rsync


rdbackup [OPTION] <archive> <archive> ...


Backup the systems defined in a config file. Rdbackup uses rsync tool to create the backups. The backuped data are stored as a exactly up to date mirror of the backuped directory. Rdbackup also store an incremental backups. The incremental backups are based on changes between data on client side and current copy on the backup server. For more information see DIRECTORY STRUCTURE section.

One of the the important part in rdbackup are tools to check a backup status. The rdbackup could create report with backup statistics and send it through an email. Next way how to check the backup consistency is checking through snmp or zabbix protocol. You could easy check backups statuses via your preferred monitoring system.


 Main options:
  -a       : do the backup and incremental archive
  -u       : create the backup disk usage statistics
  -c       : cleanup an old archives
  -w       : view the last backup status info
  -b       : same as -a -u -c -w, the most common 
             option for the command line operations
 Other options:
  -d       : debug mode
  -q       : silent mode (don't output any messages)
  -e       : create the backup report only when some archives 
             was failed (usable with -q and -w option)
  -r <num> : retry the backup process <num> times until the backup 
             status is correct
  -4       : prefer IPv4
  -h | -?  : this help screen


 Base page on SF:
 Screenshots    :
 Documentation  :
 Download       :


Install rdbackup to a backup server from the tar ball or the rpm package:

 # rpm -ivh rdbackup-x.y-1.noarch.rpm

Create a key pairs for the secure shell with an empty paraphrase:

 # ssh-keygen -t rsa

Copy the config file /etc/rdbackup.conf-sample to /etc/rdbackup.conf:

 # cp /etc/rdbackup.conf-sample /etc/rdbackup.conf

Add a line with backup description into the config file. For detailed information see the CONFIG EXAMPLES section:

 server.bkp     10 9   biguser1 biguser2
Copy the public key onto the backuped server and check if the backup server have access to the backuped host:
 # cat ~/.ssh/rsa-pub ssh root@<server> (cat >> ~/.ssh/authorized_keys)
 # ssh root@<>

Run your first rdbackup:

 # rdbackup -aucw all

Check a directory /var/rdbackup/current/server.bkp/ if data has been backuped. If you run rdbackup next time the directory /var/rdbackup/incremental/server.bpk/<date> will contains incremental data from previous run (if any).


SNMP interface could be used to monitoring status of archives. SNMP interface also can provide informations about size of archives, their start and finish times and other items. In case when you are using ZABBIX monitoring system, is better to use ZABBIX monitoring interface instead SNMP. For set up SNMP interface make follow steps:

Install and configure a net-snmp package (

 # yum install net-snmp
 # chkconfig add snmpd

Configure net-snmp. Inspiration you can take from /etc/snmpd/snmpd.conf-rdbackup. This example config is the smallest working configuration. If you don't have any special requirement them you can simply use this example. This example config provide a read-only access to the all needed rdbackup mib parts.

 # cp F</etc/snmpd/snmpd.conf-rdbackup> F</etc/snmpd/snmpd.conf>

Start snmp daemon

 #  /etc/init.d/snmpd start

Check if the snmp interface provide a expected output

 # snmpwalk -v2c -c public -m RDBACKUP-MIB  -Of localhost


Zabbix ( is huge monitoring system. Rdbackup have extensions which allows zabbix server to get data regarding with backup process. If you want to do monitoring your backups processes you should do follow steps:

Configure zabbix agent on the backup server and add the server into monitored hosts.

Edit zabbix agent configuration which is ussually placed in /etc/zabbix/

You have to add folow lines at the end of the zabbix_agentd.conf and zabbix_agent.conf file:

  # vim /etc/zabbix/zabbix_agentd.conf
  UserParameter=rdbackup.version,/usr/sbin/rdbackup-zabbix version
  UserParameter=rdbackup.lastok[*],/usr/sbin/rdbackup-zabbix lastok
  UserParameter=rdbackup.backups[*],/usr/sbin/rdbackup-zabbix backups '$1'
  UserParameter=rdbackup.stats[*],/usr/sbin/rdbackup-zabbix stats '$1'
  UserParameter=rdbackup.size.archive[*],/usr/sbin/rdbackup-zabbix size.archive '$1'
  UserParameter=rdbackup.size.last[*],/usr/sbin/rdbackup-zabbix size.last '$1'
  UserParameter=rdbackup.size.all[*],/usr/sbin/rdbackup-zabbix size.all '$1'
  UserParameter=rdbackup.backup.start[*],/usr/sbin/rdbackup-zabbix backup.start '$1'
  UserParameter=rdbackup.backup.end[*],/usr/sbin/rdbackup-zabbix backup.end '$1'
  UserParameter=rdbackup.backup.endok[*],/usr/sbin/rdbackup-zabbix backup.endok '$1'
  UserParameter=rdbackup.backup.time[*],/usr/sbin/rdbackup-zabbix backup.time '$1'
  UserParameter=rdbackup.backup.oktime[*],/usr/sbin/rdbackup-zabbix backup.oktime '$1'

Add the same section into agent_config.conf:

  # vim /etc/zabbix/zabbix_agent.conf

Restart zabbix agent:

  # /etc/init.d/zabbix-agent restart

Login into your zabbix server and import rdbackup template info your zabbix system. The base definition of the temlate you can find in /usr/share/doc/rdbackup-2.04/rdbackup-zabbix.xml file. After the template is imported you will find Template_RDBackup between templates. This template should be linked with the base definition of the backup server.


Rdbackup uses text based config file. Each line represent one archive definition. There are a several parameters which must be set to each archive. Lines have got a follow syntax:

 <archive_name>  <adays> <tgzdays>  <hostname:dir> <exclude> <exclude> ...
 <archive_name>          A unique backup identifier. With this name the backup archive is 
                         identified. This archive name is used to identify a sub directories 
                         on the backup server and as an identifier for command line. 
 <adays>                 Value determines the number of days how long should be stored 
                         incremental data. 
 <tgzdays>               Value determines the number of days how long should be stored 
                         compressed (by tar and gzip) incremental data.
 <hostname:/dir>         The backup source directory. The format is same as the rsync's source 
                         dir format.
 <exclude> <exclude> ... The excludes from the backup source. For the excludes are used the same 
                         format as in rsync's --exclude option.


 #cat /etc/rdbackup.conf
 server1.root               5  40        /home/* /proc/* /var/run/ /sys/              20 120  CVS/Entries.Log .svn/

This two rows shown two backup examples. The first one backups whole server's directory structure. Directories /home/, /proc/, /var/run/ and /sys/ are excluded because they contains data do not needed to be backuped. This data will by stored on backup server for 45 days. The last 5 archives will be not compressed an them they will be compressed and taken on during 40 days.

The second row solves backups of the home directory. In this directory entries CVS/Entries.Log and .svn/ are excluded. Non compressed archives will be stored for 20 days and compressed for 120 days.


The backuped data are stored into the follow directory structure. In the <current> directory is one to one copy for each archive. In this you will find the most newest data. In the <incremental> directory are stored incremental backups between last (current) backup stored on the server and the client side.


 1.xx,  2005-03-01 :
   initial release 
 2.00, 2007-07-02 :
  completely rewritten, new configuration file format
 2.01, 2008-08-03 :
   options update
 2.02, 2009-01-14 :
   added documentation (first public release)
 2.03, 2009-01-28 :
   The rdbackup-maile script added. This script mail oanly when a body contains any message
   Some information in the documentation added. 
 2.04, 2009-0l-28 :
   hsize bug removed 
 2.05, 2009-06-09 :
   zabbix agent support added (new rdbackup-zabbix alias)
   zabbix template added
   documentation for zabbix client added 
   rsync version detection added and differend options are used for differed version of rsync 
   --no-specials options is being used for rsync higger than 2.6.6
 2.06, 2010-09-04
   an new option (-b) added 
   a,c,u option now cretes the lockfile and the existence of the file and process is checked


Tomas Podermasnki at Brno University of Technology, <>


Bugs please report to list <> or contact author.


This is free software. You may redistribute copies of it under the terms of the GNU General Public License <>.


ssh(1), rsync(1), tar(1)