BackupPC-users

Re: [BackupPC-users] Automatic redirected restore

2012-02-19 08:22:26
Subject: Re: [BackupPC-users] Automatic redirected restore
From: Dan Johansson <Dan.Johansson AT dmj DOT nu>
To: backuppc-users AT lists.sourceforge DOT net
Date: Sun, 19 Feb 2012 14:20:55 +0100
On Saturday 18 February 2012 11.08:23 Les Mikesell wrote:
> On Sat, Feb 18, 2012 at 10:53 AM, Dan Johansson <Dan.Johansson AT dmj DOT 
> nu>wrote:
> > > Use the BackupPC_tarCreate command line program and pipe it directly
> > > to a 'tar -xf -' to extract instead of saving the output in a file.
> > >  Insert> 
> > ssh
> > 
> > > in the pipeline appropriately if you want the restore to happen
> > 
> > elsewhere.
> > 
> > Great - that was what I was looking for. Now I have another (related)
> > problem.
> > With BackupPC_archiveStart I get all shares for the host, with
> > BackupPC_tarCreate I have to explicitly name all shares. This puts me in
> > the
> > situation that I have to dynamically figure out all shares for each
> > host.
> > Are
> > there command that does this for me? If not, then I have to write a
> > small
> > perl-script  to read the host-config-file.
> 
> Something like:
> 
> BEGIN { require "config.pl"; }

I have created a small Perl script (actually a most of the code is borrowed 
from other BackupPC programs)  to list the shares for a specific host.

The only issue (that I know of / have encountered) is that if started with an 
unknown/unconfigured host the script continues and outputs the default share 
from config.pl. I really does not know how to catch this.

There are probably a few more errors/issues with the script as it is some 
years since I wrote my last Perl script (and then I was not using the object 
oriented features).
I have attached the script if someone needs something like this, feel free to 
use and change it. If you find some errors/issues and have a solution I would 
be grateful if you posted it here (or send me a private mail).

Regards,
-- 
Dan Johansson, <http://www.dmj.nu>
***************************************************
This message is printed on 100% recycled electrons!
***************************************************

Attachment: BackupPC_Get_Shares
Description: Perl program

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
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>