FreeBSD 7.3 64-bit BACULA 5.0.3
Возникли проблемы с настройкой периодов ротаций в BACULA. По задумке схема бекапа следующая:
1. Годовой бекап (FULL). Периоды ротации: тома, файлы, джобы по 3 года;
2. Квартальный бекап (DIFF). Периоды ротации: тома, файлы, джобы - 1 год;
3. Месячный бекап (DIFF). Периоды ротации: тома, файлы, джобы - 2 месяца;
4. Недельный бекап (DIFF). Периоды ротации: тома, файлы, джобы - 1 месяц;
5. Ежедневный бекап (INC). Периоды ротации: тома, файлы, джобы - 6 дней;
В клиентских секциях прописал периоды ротаций: файлы, джобы - 3 года.
Проблемы возникли после первого месяца работы системы, когда перестали отображаться сведения по файлам из годовых бекапов. BACULA пишет, что "сведения по файлам очищены". Как такое может быть если в конфиге явно задано хранить сведения 3 года? В мануале также сказано, что настройки пулов приоритетней настроек в клиентской секции. На деле не работет. Или я что-то не так делаю. Прошу помочь понять проблему.
Для ясности ниже конфиги.
конфиг DIRECTOR
Код: Выделить всё
Director {
Name = bacula.hoho.ru-dir
DIRport = 9101
QueryFile = "/usr/local/share/bacula/query.sql"
WorkingDirectory = "/var/db/bacula"
PidDirectory = "/var/run"
Maximum Concurrent Jobs = 20
Password = ""
Messages = Daemon
}
####
Job {
Name = "BackupCatalog"
Type = Backup
Level = Full
Client = bacula-fd
FileSet = "Catalog"
Schedule = "catalog_sch"
Storage = File_bacula
Messages = Daemon
Pool = bacula_monthly
RunBeforeJob = "/usr/local/share/bacula/make_catalog_backup.pl MyCatalog"
RunAfterJob = "/usr/local/share/bacula/delete_catalog_backup"
Write Bootstrap = "/var/db/bacula/bacula-job.bsr"
Priority = 11
}
Schedule {
Name = "catalog_sch"
Run = Level=Full Pool=bacula_yearly jan 1st fri at 23:30
Run = Level=Full Pool=bacula_monthly 1st sat at 6:00
Run = Level=Full Pool=bacula_weekly 2nd-5th sat at 6:00
Run = Level=Full Pool=bacula_daily mon-thu at 23:30
}
Job {
Name = "RestoreFiles"
Type = Restore
Client=bacula-fd
FileSet="Full Set"
Storage = File
Pool = Default
Messages = Standard
Where = /usr/bacula/bacula-restores
}
##### PROJECTS #########
@/usr/local/etc/bacula/bacula.conf
#@|"/sbin/sh -c т??for f in /usr/local/etc/bacula/*.conf ; do echo @${f} ; doneт??"
########################
# List of files to be backed up
FileSet {
Name = "Full Set"
Include {
Options {
signature = MD5
}
File = /usr/local/sbin
}
Exclude {
File = /var/db/bacula
File = /tmp
File = /proc
File = /tmp
File = /.journal
File = /.fsck
}
}
# This is the backup of the catalog
FileSet {
Name = "Catalog"
Include {
Options {
signature = MD5
}
File = "/var/db/bacula/bacula.sql"
}
}
# Client (File Services) to backup
# Definition of file storage device
Storage {
Name = File
# Do not use "localhost" here
Address = 192.168.xxx.yyy
SDPort = 9103
Password = "hoho"
Device = FileStorage
Maximum Concurrent Jobs = 20
Media Type = File
}
# Generic catalog service
Catalog {
Name = "MyCatalog"
dbname = "bacula"; dbuser = "bacula"; dbpassword = ""
}
# Reasonable message delivery -- send most everything to email address
# and to the console
Messages {
Name = Standard
mailcommand = "/usr/local/sbin/bsmtp -h localhost -f \"\(Bacula %c\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
operatorcommand = "/usr/local/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
mail = backup@hoho.ru = all, !skipped
operator = backup@hoho.ru = mount
console = all, !skipped, !saved
append = "/var/db/bacula/log" = all, !skipped
# console = all
# append = "/var/db/bacula/log" = all
catalog = all
# catalog = all, !skipped, !saved
}
#
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
mailcommand = "/usr/local/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
mail = backup@hoho.ru = all, !skipped
console = all, !skipped, !saved
append = "/var/db/bacula/log" = all, !skipped
# console = all
# append = "/var/db/bacula/log" = all
catalog = all
}
# 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
}
# File Pool definition
Pool {
Name = File
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
Maximum Volume Bytes = 50G # Limit Volume size to something reasonable
Maximum Volumes = 100 # Limit number of Volumes in Pool
}
# Scratch pool definition
Pool {
Name = Scratch
Pool Type = Backup
}
#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
Name = bacula.hoho.ru-mon
Password = "q1w2e3r4t5y6"
CommandACL = status, .status
}
Код: Выделить всё
## bacula conf job ##################################
Job {
Name = "bacula-job"
Type = Backup
Level = Full
Client = bacula-fd
FileSet = "bacula-set"
Schedule = "bacula_sch"
Storage = File_bacula
Messages = Standard
Priority = 10
Pool = bacula_monthly
Write Bootstrap = "/var/db/bacula/bacula-job.bsr"
}
FileSet {
Name = "bacula-set"
Ignore FileSet Changes = yes
Include {
Options {
compression = GZIP
onefs = yes
aclsupport = yes
noatime = yes
checkfilechanges = no
signature = MD5
wilddir = "TEMP"
wilddir = "TMP"
}
File = "/"
File = "/usr/local/etc"
File = "/usr/local/sbin"
}
Exclude {
File = /var/db/bacula
File = /tmp
File = /proc
File = /tmp
File = /.journal
File = /.fsck
}
}
# Client (File Services) to backup
# You should change Name, Address, and Password before using
#
Client {
Name = bacula-fd
Address = 192.168.xxx.yyy
FDPort = 9102
Catalog = MyCatalog
Password = "hoho"
File Retention = 3 years
Job Retention = 3 years
AutoPrune = yes
}
Storage {
Name = File_bacula
Address = 192.168.xxx.yyy
SDPort = 9103
Password = "hoho"
Device = FileStorage_bacula
Media Type = File_bacula
}
Pool {
Name = bacula_yearly
Pool Type = Backup
Maximum Volume Jobs = 1
Volume Retention = 3 year
File Retention = 3 year
Job Retention = 3 year
#Use Volume Once = yes
AutoPrune = yes
RecyclePool = bacula_yearly
Recycle = yes
Recycle Oldest Volume = yes
Label Format = "bacula_yearly-${Year}${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}${Minute:p/2/0/r}"
}
Pool {
Name = bacula_quarterly
Pool Type = Backup
Maximum Volume Jobs = 1
Volume Retention = 1 year
File Retention = 1 year
Job Retention = 1 year
#Use Volume Once = yes
AutoPrune = yes
RecyclePool = bacula_quarterly
Recycle = yes
Recycle Oldest Volume = yes
Label Format = "bacula_quarterly-${Year}${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}${Minute:p/2/0/r}"
}
Pool {
Name = bacula_monthly
Pool Type = Backup
Maximum Volume Jobs = 1
Volume Retention = 2 months
File Retention = 2 months
Job Retention = 2 months
#Use Volume Once = yes
AutoPrune = yes
RecyclePool = bacula_monthly
Recycle = yes
Recycle Oldest Volume = yes
Label Format = "bacula_monthly-${Year}${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}${Minute:p/2/0/r}"
}
Pool {
Name = bacula_weekly
Pool Type = Backup
Maximum Volume Jobs = 1
Volume Retention = 1 month
File Retention = 1 month
Job Retention = 1 month
#Use Volume Once = yes
AutoPrune = yes
RecyclePool = bacula_weekly
Recycle = yes
Recycle Oldest Volume = yes
Label Format = "bacula_weekly-${Year}${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}${Minute:p/2/0/r}"
}
Pool {
Name = bacula_daily
Pool Type = Backup
Maximum Volume Jobs = 1
Volume Retention = 6 days
#Use Volume Once = yes
AutoPrune = yes
RecyclePool = bacula_daily
Recycle = yes
Recycle Oldest Volume = yes
Label Format = "bacula_daily-${Year}${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}${Minute:p/2/0/r}"
}
Schedule {
Name = "bacula_sch"
Run = Level=Full Pool=bacula_yearly jan 1st fri at 23:30
Run = Level=Differential Pool=bacula_quarterly apr jul oct 1st fri at 23:30
Run = Level=Differential Pool=bacula_monthly feb mar may jun aug sep nov dec 1st fri at 23:30
Run = Level=Differential Pool=bacula_weekly 2nd-5th fri at 23:30
Run = Level=Incremental Pool=bacula_daily mon-thu at 23:30
}