Holger Parplies <[EMAIL PROTECTED]> wrote on 01/30/2007 12:35:32 AM:

 > Please correct my comments if they're wrong.
 >
 > > %ArchiveReq = (
 > >    'archiveloc' => '/var/lib/BackupPC/removable',
 >
 > That's where the archive goes.

Correct.

 > >    'reqTime' => '1170042557',
 >
 > Time the request file is generated (Perl: time()).

Correct.

 > >    'BackupList' => [
 > >      '12'
 > >    ],
 >
 > List of backup numbers to archive. Corresponds element by element with
 > HostList below, i.e. for archiving backup 1 on host1 and backup 2 on 
host2
 > you'd have BackupList = [1, 2] and HostList = ['host1', 'host2'].
 > -n option for my script, eg. -n 1,2 (default -1 = last backup).
 > I don't know how meaningful more than one entry is, but it *is* an array,
 > and BackupPC::Xfer::Archive loops over them, so ...

In fact, if you were to save the request file from an attempt to archive 
more than one host, you would see the correct format.  It relates to the 
array list of hosts below.

 > >    'HostList' => [
 > >      'localhost'
 > >    ],
 >
 > List of host names to archive. See 'BackupList'. -h option for my script.

Correct, paired with backup numbers above.

 > > How Your Code Can Submit an Archive
 > > ===================================
 > >
 > > [...]
 > >
 > > There are two problems with this.  The first is that the specific 
backup
 > > number to be archvied (BackupList) is hard-coded.
 >
 > Solved by providing a command line option, verifying existance of
 > the specified
 > backup beforehand (or at least trying to) and changing negative 
values to the
 > corresponding backup number for your convenience :).

Nice.

 > > The second problem is the fact that the time the job was requested
 > > (reqTime) is also hard-coded.
 >
 > Also solved.

Also nice.

 > Does anyone know whether the <user> parameter has to be a "valid" 
user, as
 > far as BackupPC is concerned?

Nope.  During my tests, I was throwing "123" or "xyz" onto the names 
just to see which value went where.

 > > This will run your job just as if you had submitted it from the 
GUI.  It
 > > can be scripted from wherever you would like, such as from a crontab,
 > > just as easily as using BackupPC_archiveHost.
 >
 > Note that you'll need permissions on the pc directories, so you're 
probably
 > best off to run it as backuppc user. If you do at all, that is. 
Disclaimer:
 > USE AT YOUR OWN RISK. It's like IP: best effort, no guarantees :).

You have to run the BackupPC_sererMesg command as your backuppc user 
anyway, so you might as well run the whole thing that way.  I run it 
from crontab -u backuppc.

 > > ** First, why is there a user parameter on the command line, when the
 > > request file also contains this information?  How are they used?
 >
 > I decided to supply the same user name in both places.

I belive that is how it's intended.  My question is, is there a *reason* 
for the redundancy?  I hate redundancy.  (Yet I write *long* e-mails... 
  ;)  )

 > > ** Third:  how does BackupPC_archive know which number is the latest
 > > backup?  Is there an easy way to do this outside of BackupPC, 
preferably
 > > without having to duplicate code?
 >
 > You don't need to "do it outside of BackupPC". You can use the 
library, just
 > like BackupPC does. That's what it's there for (and that's what I 
wanted to
 > play around with).

That's actually what I meant by "outside of BackupPC":  by code not 
supplied by BackupPC, just as you have done.

Of course, it helps to know perl...  :)

 > > I would like to know what the code that parses the archive request
 > > file's backup number parameter does, but it's parsed by $xfer, and I'm
 > > not sure where that code is.  I think that this is merely passed to
 > > BackupPC_archiveHost, but I am not sure.
 >
 > Correct, via $Conf {ArchiveClientCmd}.

Thank you.

Thank you for the script.  It will save me a good deal of time.

Timothy J. Massey

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Reply via email to