OK, well I think I'm getting there with AutoPrune = no set everywhere, and admin jobs set to run to prune stuff, but there are still times when bacula wants to do lengthy database operations, which I can only assume are pruning.
I just brought up the console and did: status 1 to view the director's status status Using default Catalog name=DefaultCatalog DB=bacula Status available for: 1: Director 2: Storage 3: Client 4: All Select daemon type for status (1-4): 1 spanky-dir Version: 1.36.2 (28 February 2005) i386-pc-linux-gnu debian 3.1 Daemon started 02-Jun-05 17:46, 38 Jobs run since started. Scheduled Jobs: Level Type Pri Scheduled Name Volume =================================================================================== then it just sits there, and I can picture the drive lights flashing away in the server room behind me. Once it's finished what it's doing, it will display the tapes it expects to be using for the next jobs, and carries on as usual. As far as I can tell from the manual, I have AutoPrune = no in all the right places, but it's still doing something. The admin jobs do sometimes prune stuff (I posted an example earlier), but most of them do nothing. I include below my rather large director configuration file - can anyone see anything obviously screwy? Volume retention times in the file may not quite match what is set in the database, but they are certainly similar. No need to rush any replies - I can't touch bacula for a good couple of hours now it's started on its pruning :) Another thing I find odd is this: 04-Jun 17:06 spanky-dir: Start Admin JobId 546, Job=Users_and_DeptsPruneDB.2005-06-04_16.00.03 04-Jun 17:06 spanky-dir: Bacula 1.36.2 (28Feb05): 04-Jun-2005 17:06 JobId: 546 Job: Users_and_DeptsPruneDB.2005-06-04_16.00.03 Start time: 04-Jun-2005 17:06 End time: 04-Jun-2005 17:06 Termination: Admin OK 04-Jun 17:06 spanky-dir: Begin pruning Jobs. 04-Jun 17:06 spanky-dir: No Jobs found to prune. 04-Jun 17:06 spanky-dir: Begin pruning Files. 04-Jun 20:55 spanky-dir: Pruned 852,405 Files from 10 Jobs for client zeus-fd from catalog. 04-Jun 20:55 spanky-dir: End auto prune. It started at 17:06, and finished at 20:55, according to the message log, but the "End time" value above is the same as the start time. -- Russell Howe [EMAIL PROTECTED]
# # Default Bacula Director Configuration file # # The only thing that MUST be changed is to add one or more # file or directory names in the Include directive of the # FileSet resource. # # For Bacula release 1.36.1 (26 November 2004) -- debian 3.1 # # You might also want to change the default email address # from root to your address. See the "mail" and "operator" # directives in the Messages resource. # Director { # define myself Name = spanky-dir DIRport = 9101 # where we listen for UA connections QueryFile = "/etc/bacula/scripts/query.sql" WorkingDirectory = "/usr/bacula" PidDirectory = "/var/run/bacula" Maximum Concurrent Jobs = 10 Password = "***************" # Console password Messages = Daemon } JobDefs { Name = "ServersDefaults" Type = Backup Level = Full Pool = Default Messages = Standard Storage = "Quantum DLT8000" Schedule = "ServersGFS" # These 3 shouldn't be needed, but I'm trying to make as sure as # possible that I have control over when pruning occurs. Prune Jobs = no Prune Files = no Prune Volumes = no } JobDefs { Name = "CasesDefaults" Type = Backup Level = Full Pool = Default Messages = Standard Storage = "Tandberg DLT8000" Schedule = "CasesGFS" Prune Jobs = no Prune Files = no Prune Volumes = no } JobDefs { Name = "ServersPruneDBDefaults" Type = Admin Pool = Default Messages = Standard Storage = "Quantum DLT8000" Schedule = "ServersDatabasePrune" Prune Jobs = yes Prune Files = yes Prune Volumes = yes } JobDefs { Name = "CasesPruneDBDefaults" Type = Admin Pool = Default Messages = Standard Storage = "Tandberg DLT8000" Schedule = "CasesDatabasePrune" Prune Jobs = yes Prune Files = yes Prune Volumes = yes } Job { Name = "Cases" JobDefs = "CasesDefaults" Client = zeus-fd FileSet = "K: Drive" Write Bootstrap = "/usr/bacula/Cases.bsr" Priority = 30 } Job { Name = "Thor" JobDefs = "ServersDefaults" Client = thor-fd FileSet = "Windows 2000" Write Bootstrap = "/usr/bacula/Thor.bsr" Priority = 30 } Job { Name = "Zetafax" JobDefs = "ServersDefaults" Client = artemis-fd FileSet = "Zetafax" Write Bootstrap = "/usr/bacula/Zetafax.bsr" Schedule = "SQLServerGFS" Priority = 30 } Job { Name = "Artemis" JobDefs = "ServersDefaults" Client = artemis-fd FileSet = "Windows 2000" Write Bootstrap = "/usr/bacula/Artemis.bsr" Schedule = "SQLServerGFS" Priority = 30 } Job { Name = "Users and Depts" JobDefs = "ServersDefaults" Client = zeus-fd FileSet = "F: Drive" Write Bootstrap = "/usr/bacula/Users+Depts.bsr" Schedule = "ZeusGFS" Priority = 30 } Job { Name = "Zeus" JobDefs = "ServersDefaults" Client = zeus-fd FileSet = "Windows 2000" Write Bootstrap = "/usr/bacula/Zeus.bsr" Schedule = "ZeusGFS" Priority = 30 } # Backup the catalog database (after the nightly save) Job { Name = "BackupCatalog" JobDefs = "CasesDefaults" Client = spanky-fd FileSet = "BaculaFiles" Schedule = "CatalogGFS" # This creates an ASCII copy of the catalog RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup bacula bacula" # This deletes the copy of the catalog RunAfterJob = "/etc/bacula/scripts/delete_catalog_backup" Write Bootstrap = "/usr/bacula/BackupCatalog.bsr" # Lower priority than the other backups, so that it runs last Priority = 40 } Job { Name = "CasesPruneDB" JobDefs = "CasesPruneDBDefaults" Client = zeus-fd FileSet = "K: Drive" Priority = 100 } Job { Name = "ThorPruneDB" JobDefs = "ServersPruneDBDefaults" Client = thor-fd FileSet = "Windows 2000" Priority = 101 } Job { Name = "ArtemisPruneDB" JobDefs = "ServersPruneDBDefaults" Client = artemis-fd FileSet = "Windows 2000" Priority = 102 } Job { Name = "ZetafaxPruneDB" JobDefs = "ServersPruneDBDefaults" Client = artemis-fd FileSet = "Zetafax" Priority = 103 } Job { Name = "Users and DeptsPruneDB" JobDefs = "ServersPruneDBDefaults" Client = zeus-fd FileSet = "F: Drive" Priority = 104 } Job { Name = "ZeusPruneDB" JobDefs = "ServersPruneDBDefaults" Client = zeus-fd FileSet = "Windows 2000" Priority = 105 } Job { Name = "BackupCatalogPruneDB" JobDefs = "CasesPruneDBDefaults" Client = spanky-fd FileSet="BaculaFiles" Priority = 106 } Job { Name = "RestoreToZeusT" Type = Restore Client = zeus-fd FileSet = "Windows 2000" Storage = "Tandberg DLT8000" Pool = "CasesDaily" Messages = Standard Where = "T:/restored files" } FileSet { Name = "Windows 2000" Include { Options { signature = MD5 Exclude = yes IgnoreCase = yes # Many of these are duplicated below for the F: drive FileSet. # Please make sure that any updates you make here are kept in sync # Exclude Mozilla-based programs' file caches WildDir = "[A-Z]:/Documents and Settings/*/Application Data/*/Profiles/*/*/Cache" WildDir = "[A-Z]:/Documents and Settings/*/Application Data/*/Profiles/*/*/Cache.Trash" WildDir = "[A-Z]:/Documents and Settings/*/Application Data/*/Profiles/*/*/ImapMail" # Exclude Outlook's IMAP caches WildFile = "mailhost.domain.com-*.pst" # Exclude user's registry files - they're always in use anyway. WildFile = "[A-Z]:/Documents and Settings/*/Local Settings/Application Data/Microsoft/Windows/usrclass.*" WildFile = "[A-Z]:/Documents and Settings/*/ntuser.*" # Exclude directories full of lots and lots of useless little files # This saves database space more than anything WildDir = "[A-Z]:/Documents and Settings/*/Cookies" WildDir = "[A-Z]:/Documents and Settings/*/Recent" WildDir = "[A-Z]:/Documents and Settings/*/Local Settings/History" WildDir = "[A-Z]:/Documents and Settings/*/Local Settings/Temp" WildDir = "[A-Z]:/Documents and Settings/*/Local Settings/Temporary Internet Files" # These are always open and unable to be backed up WildFile = "[A-Z]:/Documents and Settings/All Users/Application Data/Microsoft/Network/Downloader/qmgr[01].dat" # Got this out of an example in the bacula docs, but it doesn't seem to exist on our boxen - Win XP? 2003? NT4? #wild = "[A-Z]:/WINNT/CSC" # Some random bits of Windows we want to ignore WildFile = "[A-Z]:/WINNT/security/logs/scepol.log" WildDir = "[A-Z]:/WINNT/system32/config" WildDir = "[A-Z]:/WINNT/msdownld.tmp" WildDir = "[A-Z]:/WINNT/Internet Logs" WildDir = "[A-Z]:/WINNT/$Nt*Uninstall*" WildDir = "[A-Z]:/WINNT/sysvol" WildDir = "[A-Z]:/WINNT/Help" WildDir = "[A-Z]:/WINNT/Offline Web Pages" WildDir = "[A-Z]:/WINNT/Windows Update Setup Files" WildDir = "[A-Z]:/WINNT/Media" WildDir = "[A-Z]:/WINNT/Fonts" WildDir = "[A-Z]:/WINNT/msagent" WildFile = "[A-Z]:/WINNT/ShellIconCache" WildFile = "[A-Z]:/WINNT/KB*.log" WildFile = "[A-Z]:/WINNT/cluster/CLUSDB" WildFile = "[A-Z]:/WINNT/cluster/CLUSDB.LOG" WildFile = "[A-Z]:/WINNT/NTDS/edb.log" WildFile = "[A-Z]:/WINNT/NTDS/ntds.dit" WildFile = "[A-Z]:/WINNT/NTDS/temp.edb" WildFile = "[A-Z]:/WINNT/ntfrs/jet/log/edb.log" WildFile = "[A-Z]:/WINNT/ntfrs/jet/ntfrs.jdb" WildFile = "[A-Z]:/WINNT/ntfrs/jet/temp/tmp.edb" WildFile = "[A-Z]:/WINNT/system32/CPL.CFG" WildFile = "[A-Z]:/WINNT/system32/dhcp/dhcp.mdb" WildFile = "[A-Z]:/WINNT/system32/dhcp/j50.log" WildFile = "[A-Z]:/WINNT/system32/dhcp/tmp.edb" WildFile = "[A-Z]:/WINNT/system32/LServer/edb.log" WildFile = "[A-Z]:/WINNT/system32/LServer/TLSLic.edb" WildFile = "[A-Z]:/WINNT/system32/LServer/tmp.edb" WildFile = "[A-Z]:/WINNT/system32/wins/j50.log" WildFile = "[A-Z]:/WINNT/system32/wins/wins.mdb" WildFile = "[A-Z]:/WINNT/system32/wins/winstmp.mdb" # Who the hell wants to back up wallpaper? WildFile = "[A-Z]:/WINNT/*.bmp" # Temporary directories & files WildDir = "[A-Z]:/WINNT/Temp" WildDir = "[A-Z]:/temp" WildFile = "*.tmp" WildDir = "[A-Z]:/tmp" WildDir = "[A-Z]:/var/tmp" WildDir = "[A-Z]:/WUTemp" # Recycle bins WildDir = "[A-Z]:/RECYCLER" # Swap files WildFile = "[A-Z]:/pagefile.sys" # Cygwin dirs - can be easily reinstalled. WildDir = "[A-Z]:/cygwin" # These are programs and are easier to reinstall than restore from backup WildDir = "[A-Z]:/Program Files/Adobe" WildDir = "[A-Z]:/Program Files/Drive Space Explorer" WildDir = "[A-Z]:/Program Files/Common Files/Adobe" WildDir = "[A-Z]:/Program Files/Common Files/Java/Update" WildDir = "[A-Z]:/Program Files/eFax" WildDir = "[A-Z]:/Program Files/eFax Messenger Plus 3.3" WildDir = "[A-Z]:/Program Files/EPSON" WildDir = "[A-Z]:/Program Files/Global Support Services" WildDir = "[A-Z]:/Program Files/Global Support Services.ORIG" WildDir = "[A-Z]:/Program Files/Grisoft" WildDir = "[A-Z]:/Program Files/IEAK" WildDir = "[A-Z]:/Program Files/IrfanView" WildDir = "[A-Z]:/Program Files/LX-Viewer" WildDir = "[A-Z]:/Program Files/Java" WildDir = "[A-Z]:/Program Files/Java Web Start" WildDir = "[A-Z]:/Program Files/JavaSoft" WildDir = "[A-Z]:/Program Files/JGoodies" WildDir = "[A-Z]:/Program Files/Microsoft Office" WildDir = "[A-Z]:/Program Files/Mozilla Firefox" WildDir = "[A-Z]:/Program Files/Mozilla Thunderbird" WildDir = "[A-Z]:/Program Files/mozilla.org" WildDir = "[A-Z]:/Program Files/NetMeeting" WildDir = "[A-Z]:/Program Files/OfficeUpdate11" WildDir = "[A-Z]:/Program Files/OpenOffice*" WildDir = "[A-Z]:/Program Files/PuTTY" WildDir = "[A-Z]:/Program Files/Real" WildDir = "[A-Z]:/Program Files/RealVNC" WildDir = "[A-Z]:/Program Files/Seagate Software" WildDir = "[A-Z]:/Program Files/Spybot - Search & Destroy" WildDir = "[A-Z]:/Program Files/TightVNC" WildDir = "[A-Z]:/Program Files/virtualdub" WildDir = "[A-Z]:/Program Files/Windows Media Player" WildDir = "[A-Z]:/Program Files/WinZip" WildDir = "[A-Z]:/Program Files/Zetafax" WildDir = "[A-Z]:/Program Files/X-Lite" WildFile = "*.exe" WildFile = "*.dll" WildFile = "*.vxd" WildFile = "*.inf" # Entries specific to individual machines - easier than duplicating all the above per-machine # As long as these paths don't match stuff on other machines which needs backing up, we're OK # We shouldn't end up ignoring stuff we shouldn't on other machines, anyway # This is the GSS email archive from Exchange on Thor - it's on ARCserve tapes WildDir = "D:/var/mail" # Apps repository on Zeus WildDir = "T:/apps" # MS SQL files on Artemis - we backup the dumps made by MS SQL, not the raw db files WildFile = "*.[ml]df" # MS SQL Database files } File = "C:/" File = "D:/" } } FileSet { Name = "Zetafax" Include { Options { signature = MD5 IgnoreCase = yes Exclude = yes WildFile = "J:/ZETAFAX/REQUEST/ZETAFAX.LOK" WildDir = "F:/RECYCLER" } File = "J:/zfax-hermes" File = "J:/ZETAFAX" } } FileSet { Name = "F: Drive" Include { Options { signature = MD5 IgnoreCase = yes Exclude = yes WildDir = "F:\RECYCLER" # Copied from above - please make sure that updates are replicated to the "Windows 2000" FileSet. # Exclude Mozilla-based programs' file caches WildDir = "F:/userProfiles/*/Application Data/*/Profiles/*/*/Cache" WildDir = "F:/userProfiles/*/Application Data/*/Profiles/*/*/Cache.Trash" WildDir = "F:/userProfiles/*/Application Data/*/Profiles/*/*/ImapMail" # Exclude user's registry files - they're always in use anyway. WildFile = "F:/userProfiles/*/Local Settings/Application Data/Microsoft/Windows/usrclass.*" WildFile = "F:/userProfiles/*/ntuser.*" # Exclude directories full of lots and lots of useless little files # This saves database space more than anything WildDir = "F:/userProfiles/*/Cookies" WildDir = "F:/userProfiles/*/Recent" WildDir = "F:/userProfiles/*/Local Settings/History" WildDir = "F:/userProfiles/*/Local Settings/Temp" WildDir = "F:/userProfiles/*/Local Settings/Temporary Internet Files" } File = "F:/" } } FileSet { Name = "K: Drive" Include { Options { signature = MD5 IgnoreCase = yes } File = "K:/" } } # This is the backup of the catalog FileSet { Name = "BaculaFiles" Include { Options { signature = MD5 Exclude = yes WildFile = "/usr/bacula/bacula.db" } File = "/usr/bacula/" File = "/etc/bacula/" } } # OK, schedules are a bit of a mess - even though we have different priorities # on the jobs, Bacula doesn't guarantee what order things get executed in if # they are scheduled to start at the same time. What we want to happen is this: # # | "Cases tape" | "Servers" tape #------+------------------------------+----------------------------------- # | | # 10pm | Start backing up case | Start backing up stuff on servers # | repository (currently ~40G) | OTHER THAN zeus - it's probably # | from zeus | busy enough with the cases backup. # | | This means thor, artemis and # 11pm | | zetafax files. Order is not so # | | important # | | # | | # 12pm | | # | | Backup of thor finishes around now # | | # | | # 1am | | # | | # | | Backup of zetafax finishes around # | | now # 2am | | # | | # | | # | | # 3am | | # | | Backup of artemis (including SQL # | | server backup files) finishes # | | around now # 4am | | [ everything else is on zeus ] # ~ ~ # 11am | Backup of cases finishes | # | around now | # | | Backup of Users & Depts finishes # | | around now #midday| | Backup of zeus finishes around now # | | Backup of catalog finishes around # | | now # | | # 1pm | | Schedule { Name = "CasesGFS" Run = Pool=CasesDaily Monday-Thursday at 10:05pm # If you change either of the following two lines, update the # 'CatalogGFS' schedule so that it is scheduled after this. Run = Pool=CasesWeekly 2nd-5th Friday at 10:05pm Run = Pool=CasesMonthly 1st Friday at 10:05pm } # This wants to run *before* the "SQLServersGFS" schedule Schedule { Name = "ServersGFS" Run = Pool=ServersDaily Monday-Thursday at 10:05pm Run = Pool=ServersWeekly 2nd-5th Friday at 10:05pm Run = Pool=ServersMonthly 1st Fri at 10:05pm } # We want this to run after thor and zetafax, to give the databases time to be # dumped to files. # Would be best done as late as possible, but we want to back up as much non-zeus # stuff as possible while the cases backup's running. Schedule { Name = "SQLServerGFS" Run = Pool=ServersDaily Monday-Thursday at 10:06pm Run = Pool=ServersWeekly 2nd-5th Friday at 10:06pm Run = Pool=ServersMonthly 1st Fri at 10:06pm } # Run the Zeus and Users & Depts backups last - we want zeus to back up as fast # as possible when running cases Schedule { Name = "ZeusGFS" Run = Pool=ServersDaily Monday-Thursday at 10:07pm Run = Pool=ServersWeekly 2nd-5th Friday at 10:07pm Run = Pool=ServersMonthly 1st Fri at 10:07pm } # This does the catalog. It starts after the other backups Schedule { Name = "CatalogGFS" Run = Pool=CasesDaily Monday-Thursday at 11:51pm Run = Pool=CasesWeekly 2nd-5th Friday at 11:51pm Run = Pool=CasesMonthly 1st Friday at 11:51pm } # Pruning the database takes forever! # Let's do it at the weekend. This means that the database will be holding # information about the contents of tapes which have been overwritten, but # it makes bacula much more friendly to use during the week (no 2 hour # lockups while it does a prune) Schedule { Name = "ServersDatabasePrune" Run = Pool=ServersDaily Saturday at 4:00pm Run = Pool=ServersWeekly Saturday at 7:00pm Run = Pool=ServersMonthly Saturday at 9:00pm } Schedule { Name = "CasesDatabasePrune" Run = Pool=CasesDaily Sunday at 3:00am Run = Pool=CasesWeekly Sunday at 0:01pm Run = Pool=CasesMonthly Sunday at 6:13pm } # Client (File Services) to backup Client { Name = spanky-fd Address = spanky.domain.com FDPort = 9102 Catalog = DefaultCatalog Password = "*****************" AutoPrune = no } Client { Name = artemis-fd Address = artemis.domain.com FDPort = 9102 Catalog = DefaultCatalog Password = "*******************" AutoPrune = no } Client { Name = zeus-fd Address = zeus.domain.com FDPort = 9102 Catalog = DefaultCatalog Password = "*************" Maximum Concurrent Jobs = 4 AutoPrune = no } Client { Name = thor-fd Address = thor.domain.com FDPort = 9102 Catalog = DefaultCatalog Password = "**************" AutoPrune = no } Client { Name = hermes-fd Address = hermes.domain.com FDPort = 9102 Catalog = DefaultCatalog Password = "***************" AutoPrune = no } Storage { Name = "Tandberg DLT8000" Address = spanky.domain.com SDPort = 9103 Password = "*************" Device = "Tandberg DLT8000" Media Type = DLT4 } Storage { Name = "Quantum DLT8000" Address = spanky.domain.com SDPort = 9103 Password = "*************" Device = "Quantum DLT8000" Media Type = DLT4 } # Generic catalog service Catalog { Name = DefaultCatalog dbname = bacula; password = "**************" } # Reasonable message delivery -- send most everything to email address # and to the console Messages { Name = Standard # # NOTE! If you send to two email or more email addresses, you will need # to replace the %r in the from field (-f part) with a single valid # email address in both the mailcommand and the operatorcommand. # mailcommand = "/usr/lib/bacula/bsmtp -h mailhost.domain.com -f \"\(Bacula\) %r\" -s \"Bacula: %l %t %e of %n from %c\" %r" operatorcommand = "/usr/lib/bacula/bsmtp -h mailhost.domain.com -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r" mail = [EMAIL PROTECTED] = all, !skipped operator = [EMAIL PROTECTED] = mount console = all, !skipped, !saved # # WARNING! the following will create a file that you must cycle from # time to time as it will grow indefinitely. However, it will # also keep all your messages if they scroll off the console. # append = "/usr/bacula/log" = all, !skipped } # # Message delivery for daemon messages (no job). Messages { Name = Daemon mailcommand = "/usr/lib/bacula/bsmtp -h mailhost.domain.com -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r" mail = [EMAIL PROTECTED] = all, !skipped console = all, !skipped, !saved append = "/usr/bacula/log" = all, !skipped } # Used in the Job specs, but overridden in the Schedules Pool { Name = Default Pool Type = Backup } # Servers pool # Note that the "Volume Use Duration" figures here only apply # to NEWLY CREATED volumes. Check the database to see what # the values for already-labelled volumes are. # # For example: # SELECT volumename, volretention, volretention/(24*3600) AS volretentiondays # FROM media; # # To update: # UPDATE media SET volretention = 2592000 WHERE volumename LIKE '%WEEKLY%'; Pool { Name = ServersDaily Pool Type = Backup Recycle = yes Volume Retention = 5 days Volume Use Duration = 1 day Recycle Oldest Volume = yes Accept Any Volume = yes # We prune on a schedule, not automatically AutoPrune = no } Pool { Name = ServersWeekly Pool Type = Backup Recycle = yes Volume Retention = 30 days Volume Use Duration = 3 days Recycle Oldest Volume = yes Accept Any Volume = yes # We prune on a schedule, not automatically AutoPrune = no } Pool { Name = ServersMonthly Pool Type = Backup Recycle = yes Volume Retention = 5 months Volume Use Duration = 3 days Recycle Oldest Volume = yes Accept Any Volume = yes # We prune on a schedule, not automatically AutoPrune = no } # Case repos. pool Pool { Name = CasesDaily Pool Type = Backup Recycle = yes Volume Retention = 5 days Volume Use Duration = 1 day Recycle Oldest Volume = yes Accept Any Volume = yes # We prune on a schedule, not automatically AutoPrune = no } Pool { Name = CasesWeekly Pool Type = Backup Recycle = yes Volume Retention = 30 days Volume Use Duration = 3 days Recycle Oldest Volume = yes Accept Any Volume = yes # We prune on a schedule, not automatically AutoPrune = no } Pool { Name = CasesMonthly Pool Type = Backup Recycle = yes Volume Retention = 5 months Volume Use Duration = 3 days Recycle Oldest Volume = yes Accept Any Volume = yes # We prune on a schedule, not automatically AutoPrune = no } # # Restricted console used by tray-monitor to get the status of the director # Console { Name = spanky-mon Password = "************" CommandACL = status, .status }