我在小型网络中安装了 bacula,对于 Linux 机器来说,它似乎运行良好。我刚刚配置了一个 Windows 客户端,我遇到的问题是,当为 Windows 客户端运行作业时,它会备份比应备份的内容多的内容。我已将其配置为仅备份 C 和 D 驱动器上的几个目录,但实际上它正在备份整个驱动器。如果我运行
estimate job=job-name listing level=Full
在控制台中,我得到的文件列表是正确的,并且仅限于我选择的文件夹。
以下是导演配置的相关部分:
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 盘,但我不确定它在哪里,并且我希望估计命令也能遵循该快捷方式。
知道为什么备份这么多吗?
答案1
Bacula 正在按照您的要求进行备份。您已列出要备份的所有目录排除(根据您的评论)在您的包括部分(基于您上面发布的配置)。
将要排除的通配符目录列表放在正确的位置,Bacula 就会按照您的要求进行操作。
(是的,Bacula 手册对此并不是最清楚的)
答案2
问题似乎出在我的 bacula_backup_file_list 文件中的空白行。有了尾随空白行,bacula 就会开始备份驱动器的根目录以及我特别包含的所有内容;如果没有它,它只会备份我列出的内容。