BackupPC-users

Re: [BackupPC-users] Backup PC and off site data?

2013-01-21 11:52:57
Subject: Re: [BackupPC-users] Backup PC and off site data?
From: Taylor Lobb <taylor AT clearwateranalytics DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Mon, 21 Jan 2013 16:32:23 +0000

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




NOTICE: This e-mail message, together with any attachments, contains information of Clearwater Analytics and/or its affiliates that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please immediately delete it. The information we provide is from sources Clearwater Analytics considers reliable, but Clearwater Analytics provides no warranties regarding the accuracy of the information. Further, nothing in the email should be construed as legal, financial, or tax advice, and any questions regarding the intended recipient’s individual circumstances should be addressed to that recipient’s lawyer and/or accountant.
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/