[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rdiff-backup-users] comments about rdiff-backup
From: |
Keith Edmunds |
Subject: |
Re: [rdiff-backup-users] comments about rdiff-backup |
Date: |
Tue, 22 Nov 2005 18:56:37 +0000 |
User-agent: |
Debian Thunderbird 1.0.2 (X11/20051002) |
Faheem Mitha wrote:
This predictably means that (since the previous job has not completed) at
some point two different instances of rdiff-backup will be running and
trying to write to the same directory
.
.
I wonder whether it would not be possible
for rdiff-backup to detect that another rdiff-backup process was writing
to the same directory and exit gracefully?
I see this as down to the system administrator to manage, and much
easier too. For example, suppose I have two backup jobs, one backing up
user xxx and a second backing up user yyy. Those two backup jobs might
writing, respectively, to:
/backups/home/xxx/...
/backups/home/yyy...
That won't cause a problem at all. Now suppose on your system you backup
the whole of /home. A second invocation is started, so at one point
there are two rdiff-backup processes, and they are writing to the
directories shown above. How should rdiff-backup decide that the former
pair of processes are safe to run, but the latter pair are not? Yes, it
can be done by parsing command lines of other processes - but even that
may not be possible if each of user xxx and yyy are running the backup
process under their own UIDs.
What I do:
#!/bin/bash
# Start of script
ACTIVE_FLAG=/var/run/backup_in_progress
[ -e $ACTIVE_FLAG] && exit 1 || touch $ACTIVE_FLAG
.
.
# End of script
rm $ACTIVE_FLAG
Actually it's a little more sophisticated than that, but you get the idea.
Keith
--
Keith Edmunds
+---------------------------------------------------------------------+
| Tiger Computing Ltd | Helping businesses make the most of Linux |
| "The Linux Company" | http://www.TheLinuxConsultancy.co.uk |
+---------------------------------------------------------------------+