BackupPC-users

Re: [BackupPC-users] backup of backuppc and schedule, is it archive?

2010-03-11 11:40:01
Subject: Re: [BackupPC-users] backup of backuppc and schedule, is it archive?
From: Sylvain Viart - Gmail <sylvain.viart AT gmail DOT com>
To: backuppc-users AT lists.sourceforge DOT net
Date: Thu, 11 Mar 2010 17:38:13 +0100
Gerald,

[...]

Summary of this thread:

Backing up some primaries backuppc servers, on a secondary backuppc.
One of the primary hold itself 86 host.

Strategy:
Using a BackupPC_tarCreate loop on the primary, called from a 
DumpPreUserCmd on the secondary backup server.
Then the secondary backup itself the copy of every extracted host.

Gerald, noticed that it looks like archive mode, here's some pointers, 
and keywords:

http://backuppc.sourceforge.net/faq/BackupPC.html#archive_functions
$Conf{XferMethod}  = 'archive';
$Conf{ArchiveDest} = '/tmp';
BackupPC_archiveHost

On 11/03/2010 15:03, Gerald Brandt wrote:
> You can specify where the archive is saved when you create an archive 
> host, and again when you start an archive process

yep, the archive mode seems, not very well documented.

this gives me:

primary backup server:

cat /etc/backuppc/archive-for-secondary.pl
$Conf{XferMethod}  = 'archive';
$Conf{ArchiveDest} = '/tmp';

# an archive requested from the web
/tmp/host-01.96.tar.gz

Can I mount a ssh folder between the secondary and the primary for that 
purpose?..
So I could, change:

$Conf{ArchiveDest} = '/mnt/secondary_archive';
I still need to extract them on the secondary before the backup.

Here is some part of my loop, which doesn't use archive mode, run on the 
primary:

function extract_server()
{
     host=$1
     fullhost=$(awk "/^$host/ {print \$1}" $conf)
     if [ -z "$fullhost" ]
     then
         echo "fullhost not found for $host, skipped"
         return
     fi

     echo "host=$host, fullhost=$fullhost"

     # as we tar extract, the folder should be removed before overwriting
     # done on the secondary_backup by remote_pre_cmd
     destdir=$destmachine_dir/$host
     remote_pre_cmd="/etc/backuppc/remote_backup_cleanup.sh $host"
     su - backuppc -c \
     "time /usr/share/backuppc/bin/BackupPC_tarCreate -h $fullhost -n -1 
-s / / |
     ssh -l root $secondary_backup '$remote_pre_cmd && mkdir -p $destdir 
&& cd $destdir && tar -x'"
}

# extract every hosts
for host in $host_list
do
     # if I could do diff rsync would be better
     extract_server $host
done


Regards,
Sylvain.

-- 
Sylvain Viart.
Gmail.


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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/

<Prev in Thread] Current Thread [Next in Thread>