[Box Backup] Syncronous sync option with bbackupctl?

Ben Summers boxbackup@fluffy.co.uk
Wed, 25 Aug 2004 21:43:14 +0100


On 25 Aug 2004, at 21:31, Mitja Mu=C5=BEeni=C4=8D wrote:

> Ben (& the list),
>
> I was considering different usage scenarios and one ugly beast can be=20=

> imho a
> laptop user who wants to make sure his files are backed up before he=20=

> shuts
> down or gets disconnected from lan. bbackupctl sync does help, but it=20=

> is
> asyncronous (regarding to the actual process of backing data)- it=20
> sends a
> message to bbackupd and exits. bbackupd starts syncronising, but=20
> unless the
> user is monitoring network traffic or possibly ps output (does =
bbackupd
> change its state in ps listing?),

On platforms which support setproctitle(), yes, it's quite informative.

(And support is required, not just documentation. I'm looking at you,=20
Mac OS X. Having man pages for unimplemented syscalls is not sporting=20
behaviour.)

>  he doesn't know for sure when his data is
> safe.
>
> My idea is to implement a bbackupctl sync-wait command (or something=20=

> along
> those lines) which would force bbackupd to start a backup run, but the
> bbackupctl process would wait for a notification from bbackupd that =
the
> backup session has closed. Basically, when getting offline, you would=20=

> run
> bbackupctl sync-wait and when you get back to prompt, this indicates=20=

> that
> your data has been backed up. This would come handy also in shutdown
> scripts.

That sounds sensible, and has been added to my list.

If you want something before I get around to implementing this, then=20
check out the files 'last_sync_start' and 'last_sync_finish' in the=20
working directory (/var/bbackupd, perhaps?). They're touched by=20
bbackupd as it runs. So you could run the sync command, wait a few=20
seconds, then loop until the timestamp of the latter is greater than=20
the former. Or delete last_sync_start and loop until it's created=20
again.

>
> OTOH & FYI, I'm running 0.7PLUS3 and works ok so far. Even my=20
> previously
> mentioned cygwin / windows build seems to work ok.

Good news! Have you tried restoring an old version of a file which is=20
stored as a patch on the server?

Ben