Bacula

Bacula 正在備份的文件超出應有的範圍

  • September 7, 2012

我在我的小型網路中設置了 bacula,對於 linux 機器,它似乎工作正常。我剛剛配置了一個 Windows 客戶端,而我遇到的問題是,當為 Windows 客戶端執行作業時,它的備份超出了應有的程度。我將它配置為僅備份 C 和 D 驅動器上的幾個目錄,但它實際上是在備份整個驅動器。如果我跑

estimate job=job-name listing level=Full

在控制台中,我返回的文件列表是正確的,並且僅限於我選擇的文件夾。

這是director配置的相關部分:

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"
}

這是 bacula_backup_file_list:

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

和 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

我最好的猜測是這些文件夾之一中有一個快捷方式或其他東西指向 C 驅動器,但我不確定它會在哪裡,我本來希望估計命令也遵循該快捷方式。

任何想法為什麼它備份這麼多?

看起來問題是我的 bacula_backup_file_list 文件中的空白行。隨著一個尾隨的空行,bacula 開始備份驅動器的根以及我特別包含的所有內容;沒有它,它只會備份我列出的內容。

Bacula 正在備份您所告訴它的內容。您已在包含部分(基於您在上面發布的配置)中列出了所有要排除的目錄(基於您的評論)。

將要排除的萬用字元目錄列表放在正確的位置,Bacula 會做你想做的事。

(是的,Bacula 手冊對此並不是最清楚的)

引用自:https://serverfault.com/questions/416804