Title: Backing up BackupPC
Course: CIS 208: Linux/UNIX III: Intermediate System Administration, Networking, and Security ~ For IGNITE Review > Section: Learning Modules

Backing up BackupPC

Since BackupPC will be providing a core service to a networked environment, it is a good idea to make a daily backup of the BackupPC data files.  This can be accomplished by using a dedicated Network Attached Storage (NAS) device and a script.

The script will run an rsync command to replicate only the changed files from the server to the NAS.

This example shows how to use rsync to copy files to a mounted nfs fileshare.

rsync -aH --numeric-ids --delete /var/lib/BackupPC /nfs/backuppc/var/lib
rsync -aH --numeric-ids --delete /etc/BackupPc /nfs/backuppc/etc

The first time the script is run it may take a long time to complete.  If it is run every day, it will be noticeably faster, since only updates are being replicated.  Set this script to run in a cronjob during a time when backups are not scheduled to run.

In an enterprise setting, it is common to make backup tapes and to store them offsite.  If this is desired, make a tape archive of the NAS share.

To restore the system after a disaster, stop the BackupPC service.  Either perform a bare metal recovery or install BackupPC on a new server.  Use rsync to copy all the files back from the NAS device to the new server, then start the backuppc service.