[Box Backup] Suggested change in behaviour

Richard Eigenmann boxbackup@fluffy.co.uk
Mon, 20 Sep 2004 16:02:15 +0200


Basically you want to stop the delete process when the directory at a
mount point is not mounted and there was previously backed up data for
that location.

You recommend that each mount point should be backed up separately.
However you might find situations where people have mount points further
down the tree even if this is not such a good idea.

I wonder if there might not be a better way to detect an unmounted
directory? Use of fstab? But that doesn't help in your scenario. Perhaps
have a list of mountpoints in the .conf file? 

You could also have boxbackup run in "safe mode" by default (as you
describe) and use a --force-delete switch to ensure that wiped root
directories get marked as deleted in the archive.

The warning message could read something like "Directory not mounted or
empty. Use command xxx to delete it's contents from the backup archive."

Such a switch/command could for instance be useful for new users who are
setting up boxbackup and back up a small directory first and then change
the location of their root to back up everything. This would be
something like forcing the garbage collection. But that should perhaps
be called --force-gc and you have already made suggestions how this can
be triggered.

Regards,
Richard


On Mon, 2004-09-20 at 15:39, Ben Summers wrote:
>  
> Imagine this scenario. You have a single partition on a hard drive, 
> mounted as /home. This drive fails, the server reboots, but fails to 
> pass fsck checks as much is unreadable. You modify /etc/fstab so it 
> isn't mounted, and reboot. The machine comes up.
> 
> Unfortunately, you forgot to disable bbackupd running on boot, which 
> you've got running in lazy mode. It runs, does it's initial scan, and 
> marks everything in this partition as deleted.
> 
> This is unlikely to help the situation much, and incidentally, has just 
> happened to me. (Fortunately, I have "undelete" technology hidden in 
> the server, and have just written a bit of code to allow access to it 
> via bbackupquery, so it's not a calamity - even if it has also 
> undeleted files which were deleted by the users before the partition 
> vanished.)
> 
> I propose a slight change in behaviour which may go some way towards 
> resolving this problem, but I wonder if it will cause any other issues.
> 
> * If bbackupd finds that the root of a Location (as specified in 
> bbackupd.conf) contains no files or directories, it
> 
>     - will log a message "Backup location /x is empty, not changing 
> store" at level LOG_ERR
> 
>     - will not modify the relevant location on the server
> 
> Can anyone see any situation where this might cause problems? This will 
> only be triggered if there's absolutely nothing to back up in a 
> location.
> 
> Thanks,
> 
> Ben
> 
> 
> 
> _______________________________________________
> boxbackup mailing list
> boxbackup@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup
-- 
Richard Eigenmann <richard_eigenmann@compuserve.com>