cron script for rdiff-backup

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

cron script for rdiff-backup

james bardin
 I found the cause of a recent problem on my system where some diffs
were corrept and couldn't be removed.

It turns out that something happened to cron and and anacron, causing
them both to run the backup sumiltaniously. This in turn killed my all
my prior increments.

I whipped up a python script to be called from cron. It creates a PID
file, and reads the backup session arguments from a config file. It
also sends entries to syslog, and all stdout to a file in /var/log/.

Is this something anyone would want to include in the distribution, or
leave it to the end user?
Is this already done somehow?
If anyone wants to see it, is it OK to attach code to the mailing list?

jim


_______________________________________________
rdiff-backup-users mailing list at [hidden email]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Reply | Threaded
Open this post in threaded view
|

Re: cron script for rdiff-backup

Randall Nortman-3
On Mon, Jan 23, 2006 at 10:05:46AM -0500, james bardin wrote:

>  I found the cause of a recent problem on my system where some diffs
> were corrept and couldn't be removed.
>
> It turns out that something happened to cron and and anacron, causing
> them both to run the backup sumiltaniously. This in turn killed my all
> my prior increments.
>
> I whipped up a python script to be called from cron. It creates a PID
> file, and reads the backup session arguments from a config file. It
> also sends entries to syslog, and all stdout to a file in /var/log/.
>
> Is this something anyone would want to include in the distribution, or
> leave it to the end user?

I think this sort of thing is not specific enough to rdiff-backup to
warrant inclusion, but on the other hand it would be nice if
rdiff-backup built in a "repository locking" feature to keep two
copies from modifying the repository at once.  That would be generally
useful and more robust.  (Just checking from cron means that a
manually run rdiff-backup can still step on the toes of the cron job,
or vice versa.)

Randall


_______________________________________________
rdiff-backup-users mailing list at [hidden email]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Reply | Threaded
Open this post in threaded view
|

Re: cron script for rdiff-backup

Ben Escoto
In reply to this post by james bardin
>>>>> james bardin <[hidden email]>
>>>>> wrote the following on Mon, 23 Jan 2006 10:05:46 -0500

>  I found the cause of a recent problem on my system where some diffs
> were corrept and couldn't be removed.
>
> It turns out that something happened to cron and and anacron, causing
> them both to run the backup sumiltaniously. This in turn killed my all
> my prior increments.
>
> I whipped up a python script to be called from cron. It creates a PID
> file, and reads the backup session arguments from a config file. It
> also sends entries to syslog, and all stdout to a file in /var/log/.
>
> Is this something anyone would want to include in the distribution, or
> leave it to the end user?
> Is this already done somehow?
> If anyone wants to see it, is it OK to attach code to the mailing list?
I'm not sure I'd include it in the distribution, but it sounds
interesting.  You should at least put it or a link to it in the wiki
(there are some other scripts there).

Also note that the devel version writes its PID to the current_mirror
file.  It will exit (unless you use --force) if it thinks an existing
rdiff-backup process is writing to the same repository.


--
Ben Escoto

_______________________________________________
rdiff-backup-users mailing list at [hidden email]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

attachment0 (196 bytes) Download Attachment