[Box Backup] rsync:ing the backup storage?
Mon, 3 Dec 2007 09:50:55 +0000 (GMT)
On Mon, 3 Dec 2007, Magnus Homann wrote:
> >Next best is to create and lock the write.lock file in each
> > account as you copy that account.
> Is it possible to do that from a shell script in an easy way? How mych
> locking is enough?
Box itself does flock() or fcntl(F_SETLK), neither of which is possible
directly from a shell script , as far as I know. However you could write a
small C program that locks the file and goes into the background (it has
to stay running) and call that from your shell script.
> > If you do get an inconsistent copy, then it will be repaired
> > automatically on the next backup run.
> Unless my computer went into flames in the mean time. :-)
Perhaps Ben can tell us whether this is really safe, i.e. whether the
atomic behaviour works the way I think it does?
_____ __ _
\ __/ / ,__(_)_ | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |