Hi Arch,
You can use BackupPC’s built-in archive function to accomplish off-site backups. Use it to create tar archives and then copy these wherever you want (offsite server, removable media, cloud ,etc).
1.
Setup an archive host – Create a new host with it’s XferMethod set to archive
a.
Create a new .pl file in /etc/backuppc and name it something to distinguish that its an archive host (i.e. archive.pl)
b.
Paste this in to the new file, making changes that are appropriate to your environment. At a minimum you need to change the $Conf{ArchiveDest} variable to your environment’s archive directory.
i. # /etc/backuppc/dvdarchive
# Set this client's XferMethod to archive to make it an archive host:
$Conf{XferMethod} = 'archive';
# The path on the local file system where archives will be written:
$Conf{ArchiveDest} = '/mnt/archives';
# the type and level of compression used on the archive:
$Conf{ArchiveComp} = 'gzip';
$Conf{CompressLevel} = 1;
# The amount of parity data to create for the archive using the par2 utility.
# In some cases, corrupted archives can be recovered from parity data.
$Conf{ArchivePar} = 0;
# The full command to run to create archives:
$Conf{ArchiveClientCmd} = '$Installdir/bin/BackupPC_archiveHost'
. ' $tarCreatePath $splitpath $parpath $host $backupnumber'
. ' $compression $compext $splitsize $archiveloc $parfile *';
$Conf{ArchivePreUserCmd} = undef;
$Conf{ArchivePostUserCmd} = undef;
# Logging verbosity:
$Conf{XferLogLevel} = 1;
c.
Add the new archive host to BackupPC’s hosts file
i. /etc/backuppc/hosts
ii. Sample hosts file
1.
#
# The first non-comment non-empty line gives the field names and should
# not be edited!!
#
host dhcp user moreUsers # <--- do not edit this line
#farside 0 craig jill,jeff # <--- example static IP host entry
#larson 1 bill # <--- example DHCP host entry
archive 0 backuppc
d.
Restart BackupPC
i. /etc/init.d/backuppc restart
e.
The archive host will now appear in the web interface. Select your archive hostname from the Hosts dropdown list. From there, instead of kicking off a backup, you can create archives.
i. Click the Start Archive button
ii. Select one or more hosts and select Archive selected hosts
iii. Here you can change archive location, compression and splitting the output into specifc size (useful for removable media like dvds).
2.
To get this archives offsite (and optionally automate this using cron), you can use the built-in BackupPC_archiveStart script. The script will create an uncompressed (raw) backup file using
your default settings (the settings you set in the archive.pl file).
a.
This script is located in your Install directory /bin
i. You can find your install directory by checking in /etc/backuppc/config.pl and searching for $Conf{InstallDir}
1.
Ex. In my environment the script is located in /usr/share/backuppc/bin
b.
Usage for script
i. BackupPC_archiveStart archiveHost username hosts (delimited by spaces)
c.
Note* the script must be run as the BackupPC user
3.
In my case, I wanted the script to create compressed tar files, but the BackupPC_archiveStart script is hard-coded for the raw uncompressed files. You can edit the script if you would like
to change the archive type.
a.
I created a copy of the BackupPC_archiveStart script and named it BackupPC_archiveStart_gzip, then I edited it and changed a couple things.
i. compression => $bpc->{Conf}{GzipPath},
compext => ‘.gz’,
b.
Now running this script will create a compressed .gz file in your default archive directory
4.
You can now create a cron job to automatically create .gz files in your default archive directory, and you can take those files and move\copy them wherever you want (rysnc to offsite server,
cloud, etc.).
Hope this helps,
Taylor
From: Arch Willingham [mailto:arch AT tuparks DOT com]
Sent: Monday, January 21, 2013 8:42 AM
To: 'backuppc-users AT lists.sourceforge DOT net'
Subject: [BackupPC-users] Backup PC and off site data?
Has anyone ever used Backuppc to store data off site? By offsite I mean ether to the cloud or to a server at another site.
Thanks!
Arch