[Box Backup] Backing UP the root filesystem

Thomas Glanzmann boxbackup@fluffy.co.uk
Wed, 1 Feb 2006 07:31:25 +0100


Hello,
I found the problem why my ExcludeDir directions doesn't work if I
backup the '/' filesystem. The problem is this line of code in
BackupClientDirectoryRecord.cpp around line 542:

        std::string filename(rLocalPath + DIRECTORY_SEPARATOR + *f);

So everytime a Backup directive ends with a '/' the exclude list runs into some
trouble:

My '/' becomes '//' because of the '+ DIRECTORY_SEPARATOR' statement
above. I adopted my exclude list to include the double slash and the
directories are no longer be backed up.

I think that we should add some code which tests for aggregated '/'s in
pathnames and remove them in bbackupd.

        BackupLocations
        {
                lutz
                {
                        Path = /
                        ExcludeFile = //etc/box/bbackupd/1-FileEncKeys.raw
                        ExcludeFile = //home/sithglan/media
                        ExcludeDir  = //webfarm
                        ExcludeDir  = //data
                        ExcludeDir  = //dev/shm
                }
        }

Greetings,
        Thomas