BackupPC-users

Re: [BackupPC-users] archiveReq.xxxx.yy

2010-10-27 10:54:22
Subject: Re: [BackupPC-users] archiveReq.xxxx.yy
From: Timothy J Massey <tmassey AT obscorp DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Wed, 27 Oct 2010 10:52:09 -0400
Jérôme DESPATIS <jerome.despatis AT source-rh DOT com> wrote on 10/27/2010 09:19:59 AM:

> I'd like to schedule an archive job (launched by cron)
>
> While googling I've seen this very interesting post:
>
http://www.mail-archive.com/backuppc-users AT lists.sourceforge DOT net/msg04469.html

Hey, that's me!  :)

> And an example code:
>
http://www.mail-archive.com/backuppc-users AT lists.sourceforge DOT net/msg04514.html
>
>  From those inspiratio, i've created a very basic php script that sends
> the correct message to launch the archive job, it's ok and working, I
> can see the launching process in the log
>
> BUT: if I cancel the archive job with the CGI, everything seems to be
> fine, but ps uax tells me tar process is still active, and in fact the
> archive job is not stopped at all!
>
> I've created in fact a php script that creates the file
> archiveReq.xxx.0, xxx being replaced by the pid of my php script
>
> => maybe backuppc really uses the value of xxx into this filename to
> kill the correct pid ? (and of course, this pid no more exist, as my php
> script is an external script that sends the message to backuppc daemon
> and closes just after)

I don't think so:  the same technique is used by the Perl code to create the archiveReq file.  The reason that's done is to ensure a unique name, not to allow it to know what the PID is.

If you check the Server Status page while an archive is running, you'll see that BackupPC knows the PID of the process properly.

Here's a question:  have you tried using the standard GUI to start and stop an archive?  From my recollection, BackupPC won't kill the tar immediately even when it's started from its own GUI.  I usually have to go in and kill the process manually no matter how the archive job is started.  But my recollection may be incorrect.

On a different note, I would be interested to see your PHP code.

Timothy J. Massey
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
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>