lock file for backup directory

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

lock file for backup directory

Sébastien Maret-2
Listing the increments in a backup directory while an other backup is in
progress give the following error:

rdiff-backup -l host::/path/to/backup
Fatal Error: Previous backup to /path/to/backup seems to have failed.
Rerun rdiff-backup with --check-destination-dir option to revert directory to state before unsuccessful session.

The message is confusing, since the previous backup hasn't failed,
but it just hasn't finished yet.

Beside, I am not sure if doing other operation (like delete old
increments) while a backup is in progress is safe. If not, it might be
useful to implement a lock system, to prevent two different
rdiff-backup processes to modify a backup directory simultaneously.

Sébastien




_______________________________________________
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: lock file for backup directory

Ben Escoto
>>>>> Sebastien Maret <[hidden email]>

>>>>> wrote the following on Thu, 26 Jan 2006 11:26:43 -0500
> Listing the increments in a backup directory while an other backup is in
> progress give the following error:
>
> rdiff-backup -l host::/path/to/backup
> Fatal Error: Previous backup to /path/to/backup seems to have failed.
> Rerun rdiff-backup with --check-destination-dir option to revert directory to state before unsuccessful session.
>
> The message is confusing, since the previous backup hasn't failed,
> but it just hasn't finished yet.
>
> Beside, I am not sure if doing other operation (like delete old
> increments) while a backup is in progress is safe. If not, it might be
> useful to implement a lock system, to prevent two different
> rdiff-backup processes to modify a backup directory simultaneously.
In general it's not a good idea to have two rdiff-backup processes
working on the same directory.  I've changed the error message to:

 The previous backup to %s is still in progress or has failed.
 You can rerun rdiff-backup with --check-destination-dir option to revert
 the directory to the state it was in before an unsuccessful session.
 However,
 *** -------------------------------------------------------------------- ***
 *** If an rdiff-backup process is currently running,                     ***
 *** DO NOT RUN --check-destination-dir OR OTHERWISE MODIFY THE DIRECTORY ***
 *** -------------------------------------------------------------------- ***

which is hopefully clearer, and stresses the important parts :-)

Recent development versions of rdiff-backup will abort by default if
they think another rdiff-backup process is writing to the same
directory.


--
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