День добрый.
Настраиваю систему резервного копирования bacula. Замечательная программа с хорошим функционалом.
Возник вопрос следующего плана. Рассказываю всё по порядку.
До дифференциального или инкрементального бекапа из каталога, который указан в fileset для архивирования удаляются несколько файлов. После бекапа производится процедура восстановления и в наборе данных присутствуют удаленные файлы. Т.е. программа не следит за удалением файлов в каталоге и не удаляет их в базе.
Причем ситуация наблюдается именно при дифференциальном или инкрементальном копировании - в полных копиях удалённые файлы отсутствуют. Также задание верификации уровня DiskToCatalog определяет данное расхождение. Решение проблемы подскажите.
Версия 2.2.9 тестируется под Windows, но планируется внедрять под Линукс.
#
# 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 2.2.9-b6 (04/06/08) -- Windows MVS
#
# 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 = ittest-dir
DIRport = 9101 # where we listen for UA connections
QueryFile = "C:\\Bacula\\bin\\query.sql"
WorkingDirectory = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work"
PidDirectory = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work"
Maximum Concurrent Jobs = 1
Password = "***" # Console password
Messages = Daemon
}
#задачи
JobDefs {
Name = "DefaultJob"
Type = Backup
Level = Incremental
Client = ittest-fd
FileSet = "Test Set"
Schedule = "WeeklyCycle"
Storage = File
Messages = Standard
Pool = Default
Priority = 10
}
Job {
Name = "work_copy_full"
Type = Backup
# JobDefs = "DefaultJob"
Level = Full
Client = ittest2-fd
FileSet = "backup_share_full"
Storage = File
Messages = Standard
Pool = Default
Full Backup Pool = SSFullPool
Incremental Backup Pool = SSIncPool
Differential Backup Pool = SSDifPool
Schedule = "copy_sh"
Priority = 10
Write Bootstrap = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\Client1.bsr"
}
# для записи DVD
Job {
Name = "Backup_DVD"
Type = Backup
# JobDefs = "DefaultJob"
Level = Full
Client = ittest2-fd
FileSet = "backup_share_full"
Storage = DVD_storage
Messages = Standard
Pool = SSFullPool
Priority = 10
Write Bootstrap = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\DVD.bsr"
}
# проверяем каталог бекапа
Job {
Name = "verification_backup"
Type = Verify
Level = Catalog
#Catalog = MyCatalog
# VolumeToCatalog
Verify Job = "work_copy_full"
Client = ittest-fd
FileSet = "backup_share_full"
Storage = File
Messages = Standard
Pool = Default
Full Backup Pool = SSFullPool
Incremental Backup Pool = SSIncPool
Differential Backup Pool = SSDifPool
#Prune Jobs = yes
#Prune Files = yes
#Prune Volume = yes
Priority = 10
Write Bootstrap = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\verify.bsr"
}
#
# Standard Restore template, to be changed by Console program
# Only one such job is needed for all Jobs/Clients/Storage ...
#
Job {
Name = "RestoreFiles"
Type = Restore
Client=ittest2-fd
FileSet="backup_share_full"
Storage = File
Pool = Default
Messages = Standard
Where = "C:\\tmp\\bacula-restores"
}
FileSet {
Name = "backup_share_full"
Include {
Options {
signature = MD5
}
File = "C:/share"
}
}
# задания
Schedule {
Name = "copy_sh"
Run = Full hourly at 0:00
Run = Differential hourly at 0:05
Run = Differential hourly at 0:15
Run = Differential hourly at 0:25
Run = Differential hourly at 0:35
Run = Differential hourly at 0:45
Run = Differential hourly at 0:55
}
Schedule {
Name = "WeeklyCycle"
Run = Full 1st sun at 23:05
Run = Differential 2nd-5th sun at 23:05
Run = Incremental mon-sat at 23:05
}
# This schedule does the catalog. It starts after the WeeklyCycle
Schedule {
Name = "WeeklyCycleAfterBackup"
Run = Full sun-sat at 23:10
}
#файловые наборы
# This is the backup of the catalog
FileSet {
Name = "Catalog"
Include {
Options {
signature = MD5
}
File = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\bacula.sql"
}
}
#клиенты
# Client (File Services) to backup
Client {
Name = ittest-fd
Address = ittest
FDPort = 9102
Catalog = MyCatalog
Password = "*****" # password for FileDaemon
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}
#
# Second Client (File Services) to backup
# You should change Name, Address, and Password before using
#
Client {
Name = ittest2-fd
Address = 192.168.0.120
FDPort = 9102
Catalog = MyCatalog
Password = "*****" # password for FileDaemon 2
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}
Client {
Name = vmvare
Address = ittest
FDPort = 9102
Catalog = MyCatalog
Password = "*****" # password for FileDaemon
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}
#хранилища
# Definition of file storage device
Storage {
Name = File
# Do not use "localhost" here
Address = ittest # N.B. Use a fully qualified name here
SDPort = 9103
Password = "******"
Device = FileStorage
Media Type = File
}
Storage {
Name = DVD_storage
# Do not use "localhost" here
Address = ittest2 # N.B. Use a fully qualified name here
SDPort = 9103
Password = "******"
Device = DVD_backup
Media Type = DVD
}
# каталог
# Generic catalog service
Catalog {
Name = MyCatalog
dbname = bacula; user = 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 = "\"C:\\Bacula\\bin\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
operatorcommand = "\"C:\\Bacula\\bin\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r"
mail = Администратор = all, !skipped
operator = Администратор = 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 = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\log" = all, !skipped
}
#
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
mailcommand = "\"C:\\Bacula\\bin\\bsmtp\" -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"
mail = Администратор = all, !skipped
console = all, !skipped, !saved
append = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\log" = all, !skipped
}
# пулы
Pool {
Name = SSFullPool # пул для полной копии
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes
#AcceptAnyVolume = yes
}
Pool { #пул дифференцальной копии
Name = SSDifPool
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes
#AcceptAnyVolume = yes
}
Pool { #пул инкременальной копии
Name = SSIncPool
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes
#AcceptAnyVolume = yes
}
# Default pool definition
Pool {
Name = Default
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
}
# Scratch pool definition
Pool {
Name = Scratch
Pool Type = Backup
}
#определяем пулы для полных и дифференцальных копий
#консоли
# Restricted console used by tray-monitor to get the status of the director
#
Console {
Name = ittest-mon
Password = "****"
CommandACL = status, .status
}