rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] locking the rdiff-backup destination


From: Jakob Unterwurzacher
Subject: Re: [rdiff-backup-users] locking the rdiff-backup destination
Date: Thu, 24 Dec 2009 02:38:23 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0

Am 2009-12-23 22:06, schrieb Alex Samad:
On Tue, Dec 22, 2009 at 11:13:44AM +0100, Jakob Unterwurzacher wrote:
Alex Samad schrieb:
Hi

Is there a tool to lock the db such that rdif-backup will not use the
destination - i know rdif-backup does it.


I want to lock the db and then rsync the destination offsite and then
unlock the db.

With "db" you mean the rdiff-backup destination directory?

yes, I would like to lock the rdiff-backup destination such that
rdiff-backup will not use it until after the rsync offsite has finished.

I guess you will have to use a wrapper script for your rsync job and your rdiff-backup job that does the locking (and obeys the lock).

If you start both jobs at the same machine, it's easy:
Put this at the start of each script - it will then exit when another instance is running.

#####

#!/bin/bash

exec 200> /tmp/lockfileXYZ
flock -n 200 || echo 'Could not get lock!' && exit 1

#####


Jakob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]