Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have bacula set up in my small network, and for linux machines, it seems to be working fine. I just configured a windows client, and the problem that I'm having is that when the job runs for the windows client, it backs up more than it should be. I have it configured to only back up a few directories on my C and D drives, but it's actually backing up the entire drive. If I run

estimate job=job-name listing level=Full

in the console, the list of files that I get back is correct, and limited just to the folders that I've selected.

Here's the relevant pieces of the director configuration:

FileSet {
    Name = "Windows Client Defined"
    Include {
        Options {
            signature = MD5
            compression = gzip
            onefs = no
            IgnoreCase = yes
            exclude = yes
            # Exclude directories full of lots and lots of useless little files for Windows 2008
            WildDir = "[A-Z]:/Users/*/Cookies"
            WildDir = "[A-Z]:/Users/*/Recent"
            WildDir = "[A-Z]:/Users/*/Local Settings/History"
            WildDir = "[A-Z]:/Users/*/Local Settings/Temp"
            WildDir = "[A-Z]:/Users/*/Local Settings/Temporary Internet Files"
            # Temporary directories & files
            WildDir = "[A-Z]:/Windows/Temp"
            WildDir = "[A-Z]:/Temp"
            WildFile = "*.tmp"
            WildDir = "[A-Z]:/Tmp"
            WildDir = "[A-Z]:/var/tmp"
            WildDir = "[A-Z]:/Windows/Internet Logs"
            WildDir = "[A-Z]:/Windows/$Nt*Uninstall*"
            # Recycle bins
            WildDir = "[A-Z]:/RECYCLER"
            # Swap files
            WildFile = "[A-Z]:/pagefile.sys"
            WildFile = "[A-Z]:/hiberfil.sys"
        }
        File = "\\<C:/bacula_backup_file_list"
    }
    Exclude {
        File = "\\<C:/bacula_backup_exclude_file_list"
    }
}

JobDefs {
  Name = "DefaultWindowsJob"
  Type = Backup
  Schedule = "WeeklyCycle"
  FileSet = "Windows Client Defined"
  Storage = Storage
  Messages = Standard
  Priority = 10
  Pool = Default
  Full Backup Pool = Full-Pool
  Incremental Backup Pool = Inc-Pool
  Differential Backup Pool = Diff-Pool
}

Job {
  Name = "win"
  JobDefs = "DefaultWindowsJob"
  Client = win-fd
  Write Bootstrap = "/var/lib/bacula/win.bsr"
}

Here is the bacula_backup_file_list:

C:/Users/user
C:/Documents
D:/Projects

And the bacula_backup_exclude_file_list:

C:/Users/user/.m2/repository
C:/Users/user/Downloads
C:/Users/user/.android
C:/Users/user/Music
C:/Users/user/Google Drive

My best guess is that there's a shortcut or something in one of these folders that's pointing back to the C drive, but I'm not sure where it would be, and I would have expected the estimate command then to follow that shortcut as well.

Any ideas why it's backing up so much?

share|improve this question

2 Answers 2

Bacula is backing up exactly what you're telling it to. You have listed all of the directories that you want to exclude (based on your comments) in your include section (based on the configuration you posted above).

Put the list of wildcard directories to be excluded in the correct place and Bacula will do what you want.

(Yes the Bacula manual isn't the most clear about this)

share|improve this answer
    
I've seen a few examples that use excludes in the include section, the specific config I'm using came from adsm.org/lists/html/Bacula-users/2010-05/msg00030.html. Is this not legal? According to my input list though, things like c:/Program Files shouldn't be backed up at all, as that's not in my input list, but those folders are getting backed up. Even without the wild card directories (which technically shouldn't be needed because most of those folders shouldn't be backed up anyway), it still gets everything on the drive, and not just what I'm telling it to. –  Matt McMinn Aug 13 '12 at 16:16
    
@MattMcMinn Per the docs it's perfectly legal, but I've had trouble with it myself and found listing stuff in the Exclude { } section to be more reliable. The other thing to try would be listing your includes explicitly instead of reading an include file list (assuming they're consistent enough that you can do so) –  voretaq7 Aug 13 '12 at 16:20
    
Gotcha - I actually only added wildcard directories in an attempt to limit what it was incorrectly grabbing. Right now I only have the one windows machine that I'm trying to backup, so I could put it directly in the director config - I'll try that and see if it changes anything. Thanks. –  Matt McMinn Aug 13 '12 at 17:32
up vote 1 down vote accepted

It looks like the issue was a blank line in my bacula_backup_file_list file. With a trailing blank line, bacula starts backing up the root of the drive as well as everything that I've specifically included; without it, it only backs up what I've listed.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.