BackupPC-users

Re: [BackupPC-users] Making a different per host setting without a pc/hostname.pc file

2009-08-11 13:31:54
Subject: Re: [BackupPC-users] Making a different per host setting without a pc/hostname.pc file
From: "Jeffrey J. Kosowsky" <backuppc AT kosowsky DOT org>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Tue, 11 Aug 2009 13:25:44 -0400
John Rouillard wrote at about 16:52:16 +0000 on Tuesday, August 11, 2009:
 > On Mon, Aug 10, 2009 at 02:05:51AM -0400, Jeffrey J. Kosowsky wrote:
 > > John Rouillard wrote at about 15:54:36 +0000 on Thursday, August 6, 2009:
 > >  > I run multiple backupc servers over wan's and I am trying to implement
 > >  > the following logic:
 > >  > 
 > >  >   If the host being backed up by the backuppc server is at the same
 > >  >     site as the backuppc server, do not add --bwlimit to 
 > > $Conf{RsyncArgs}.
 > >  > 
 > >  >   If the host being backed up by the backuppc server is at a different
 > >  >     site, add "--bwlimit=64" to $Conf{RsyncArgs}.
 > >  > 
 > >  > Ideally this should be placed into the config.pl so it works for all
 > >  > hosts, but I don't see any way to get the current hostname when the
 > >  > configuration is loaded.
 > 
 > So it looks like the current hostname only comes into play at the
 > hostname.pl config file load level? Or does the load of config.pl also
 > have $_[1] set to the hostname.

I'm not sure - but I believe it is just a perl thing related to how
the hostname.pl file is sourced. Try it though to confirm.

On a similar note, I have suggested that BackupPC load in more
user-accessible variables such as 'hostname' etc.

 > >  > While I can create 100+ pc/hostname.pl files, this gets very messy
 > >  > very quickly since I have to have at least two copies of each
 > >  > pc/hostname.pl file for the two (or more) backup servers that are
 > >  > backing up the data on the host. I have done this before with other
 > >  > backup systems, and trying to audit and verify the configuration is a
 > >  > total mess.
 > >  > 
 > >  > I would like to allow this to be overidden by pc/hostname.pl files as
 > >  > there will be a dozen or so that need to have special bwlimit settings
 > >  > because of the amount of data that they transfer, but this is maybe 20
 > >  > files total, not the 200+ I am looking at having to manage.
 > >  > 
 > >  > So does anybody have any ideas? Is there a $Conf{CurrentHostName}
 > >  > value I am not seeing? Other ideas on how to do this programatically?
 > > 
 > > I described a way to do this back in the archives...
 > > Briefly, in /etc/BackupPC/pc, create links from each <hostname>.pl to
 > > the config file you want to use for that group of hosts. Then use perl
 > > code within that config file to recover the name of the specific host
 > > by looking at the variable $_[1] which will be set to <hostname>.
 > 
 > I already use the link idea where I can, but that is still a
 > maintainance nightmare. What I would like is rather than a link, a
 > file to be loaded with the group level info (specified in the hosts
 > file somehow) that I can manipulate.
 > 
 > The hostname location in $_[1] may do the trick however. Thanks for
 > that bit of info.
 > 
 > --
 >                              -- rouilj
 > 
 > John Rouillard       System Administrator
 > Renesys Corporation  603-244-9084 (cell)  603-643-9300 x 111
 > 
 > ------------------------------------------------------------------------------
 > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
 > trial. Simplify your report design, integration and deployment - and focus 
 > on 
 > what you do best, core application coding. Discover what's new with 
 > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 > _______________________________________________
 > 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/
 > 

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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/