Backup PC Notes

Categories: Linux.

Read how to use BackupPC from my experience with it backing up Windows XP and Windows 7 machines.

BackupPC Notes

BackupPC is an application that runs on a Linux platform and is accessible from any computer on the network using any web browser. It will back up any PC and folders that are required. Space is saved by compression and reusing files already backed up from other machines.

Ideally the backup files should be kept on an external Linux formatted partition.

Change Password

Please make a note of the web frontend password for the user backuppc. If you don’t like the password, you can change it by running

htpasswd /etc/backuppc/htpasswd backuppc

Moving the “Pool”

If the pool disk requirements grow you might need to copy the entire data directory to a new (bigger) file system. Hopefully you are lucky enough to avoid this by having the data directory on a RAID file system or LVM that allows the capacity to be grown in place by adding disks.

The backup data directories contain large numbers of hardlinks. If you try to copy the pool the target directory will occupy a lot more space if the hardlinks aren’t re-established.

The best way to copy a pool file system, if possible, is by copying the raw device at the block level (eg: using dd). Application level programs that understand hardlinks include the GNU cp program with the -a option and rsync -H. However, the large number of hardlinks in the pool will make the memory usage large and the copy very slow. Don’t forget to stop BackupPC while the copy runs.

For example:

root@pavlinux:/var/lib# cp -a backuppc/* backuppc1/ &

This copies the existing pool (backuppc) to a new disk which has been linked to backuppc1. The “&” causes the job to run in the background.

Migrating or Reinstalling BackupPC

For my system the pool is located on a USB external drive. I needed to upgrade from Fedora to Ubuntu with BackupPC keeping the same pool.

The steps:

  1. Install backuppc on the new server.
  2. Mount the storage on the same position/path.
    1. Be sure that the “backuppc” UID and GID (Group and User IDs) are the same as for the old server. I had to change them manually. This is important to me because my NFS kept the file permissions and ownership of the files.

    For example, I have an external HDD mounted at /media/WDextHDD-L1/.
    To use this create a symbolic link from /var/lib/backuppc to /media/WDextHDD-L1/backupPCdata using the command:

    ln -s /media/WDextHDD-L1/BackupPCdata /var/lib/backuppc
  3. In /etc/backuppc:
    • Reconfigure the config.pl based on the old one. It’s not recommended to directly copy the old one.
    • Reconfigure the hosts file based on the old one.
    • Copy the “servers.pl” files from the old server to the new one.
    • Copy the ht* files from the old server to the new one.
  4. Change the configuration of apache2 as the documentation explains.
  5. Stop the backuppc daemon on the old server and unmount the NFS pool storage.
  6. Start the backuppc daemon on the new server.
  7. Test the backup and restore manually. Check the configuration.
  8. Test the automatic backup during night, or whenever you have yours scheduled.

(from http://permalink.gmane.org/gmane.comp.sysutils.backup.backuppc.general/25246)

Leave a Reply