Backuppc: Moving the pool

Here are the instructions to create a dual disk system using backuppc. This approach creates a “copy” of the pool data without RAID. I have two external USB drives, both 500 Gig here. The advantage (I think) of this method is that if a mistake is made or a disk crashes no rebuilding is needed, just a copy. Also, the second disk can be removed for safe keeping, all we need is a replacement disk (no rebuilding)

1). Stop backuppc:
/etc/init.d/backuppc stop

2). Sync the current default location to your new mount point excluding “pc” (USB device = /data1):
rsync -avPH –exclude=pc/ –delete /var/lib/backuppc/ /data1/backuppc/
(This creates all the data for backuppc in /data1/backuppc, the “H” preserves hard links)

3). Move the old location to a new file, just in case:
mv /var/lib/backuppc /var/lib/backuppc_old

4). Change the /data1 mount point in /etc/fstab to mount /var/lib/backuppc, here’s the line:
before: /dev/sdc /data1/backuppc ext3 defaults 0 0
after: /dev/sdc /var/lib/backuppc ext3 defaults 0 0

5). If there’s a second disk, setup a crontab with an rsync:
rsync -aPH –exclude=pc/ –delete /var/lib/backuppc/ /data2/backuppc/ >/dev/null 2>&1

6). Reboot and verify the disk(s) are mounted correctlty

7). Start backuppc, /etc/init.d/backuppc start

8). After a few days if all is working remove /var/lib/backuppc_old

Note: Rather than creating a symbolic link from /var/lib/backuppc to /data1/backuppc I opted to create a static mount point in /etc/fstab. This is more straightforward. When someone runs “df -k” they’ll see the giant mount point at /var/lib/backuppc and hopefully notice that it’s a USB device.

Formatting USB: You may also have to format the USB drive with “mkfs.ext3 /dev/sdc”. The device can be determined pretty easily with the Logical Volume Management Tool available in the GNOME GUI.

Further Note: Changing /etc/BackupPC/ and some of the files like “/usr/lib/BackupPC/” so the top directory is hard changed is NOT recommended. This is because someone else may update the backuppc package and the topDir will break.