Bacula inkrementális v. diff mentés

Fórumok

Sziasztok!

Van egy bacula, ami folyamatosan Full backupot csinál az inkrementális helyett, pedig úgy van beállítva a rendszer h. heti egy full, majd utána inkrementális.
Már áttúrtam egy halom dolgot, állítottam h. mit figyeljen, mikor változik egy fájl, mikor nem.
A helyzet a köv:
rsnapshot csinál egy backupot a backup szerverre, aminek a .sync könyvtárából kellene készüljön egy full, majd 6 inkrementális mentés. Ezzel szemben a bacula folyamatosan full mentést csinál.

bacula-dir.conf

Director { # define myself
Name = backup-dir
DIRport = 9101 # where we listen for UA connections
QueryFile = "/etc/bacula/scripts/query.sql"
WorkingDirectory = "/var/lib/bacula"
PidDirectory = "/var/run/bacula"
Maximum Concurrent Jobs = 1
Password = "pw" # Console password
Messages = Daemon
DirAddress = 127.0.0.1
}

JobDefs {
Name = "WeeklyIncrementalDef"
Type = Backup
Level = Incremental
Client = backup-fd
FileSet = "Full Set"
Schedule = "WeeklyCycle"
Storage = Ultrium
Messages = Standard
Pool = Default
Priority = 10
Write Bootstrap = "/var/lib/bacula/%c.bsr"
}

Job {
Name = "WeeklyIncremental"
JobDefs = "WeeklyIncrementalDef"
}

Job {
Name = "RestoreFiles"
Type = Restore
Client=backup-fd
FileSet="Full Set"
Storage = File
Pool = Default
Messages = Standard
Where = /srv/bacula-restores
}

FileSet {
Name = "Full Set"
Include {
Options {
signature = MD5
Verify = pin5
}
File = /srv/backup/libra/.sync/
File = /srv/backup/fs-mail/.sync/
}
}

Schedule {
Name = "WeeklyCycle"
Run = Level=Full sun at 2:05
Run = Level=Incremental mon-sat at 2:05
}

Schedule {
Name = "WeeklyCycleAfterBackup"
Run = Full sun-sat at 23:10
}

FileSet {
Name = "Catalog"
Include {
Options {
signature = MD5
}
File = "/var/lib/bacula/bacula.sql"
}
}

Client {
Name = backup-fd
Address = localhost
FDPort = 9102
Catalog = MyCatalog
Password = "pw" # password for FileDaemon
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}

Storage {
Name = File
Address = localhost # N.B. Use a fully qualified name here
SDPort = 9103
Password = "pw"
Device = FileStorage
Media Type = File
}

Storage {
Name = Ultrium
Address = localhost # N.B. Use a fully qualified name here
SDPort = 9103
Password = "pw" # password for Storage daemon
Device = LTO-3 # must be same as Device in Storage daemon
Media Type = LTO-3 # must be same as MediaType in Storage daemon
Autochanger = no # enable for autochanger device
}

Catalog {
Name = MyCatalog
dbname = "bacula"; dbuser = ""; dbpassword = ""
}

Messages {
Name = Standard

mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \\" -s \"Bacula: %t %e of %c %l\" %r"
operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \\" -s \"Bacula: Intervention needed for %j\" %r"
mail = zoltan.kiss at ss.hu = all, !skipped
operator = zoltan.kiss at ss.hu = mount
console = all, !skipped, !saved
append = "/var/lib/bacula/log" = all, !skipped
catalog = all
}

Messages {
Name = Daemon
mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
mail = root@localhost = all, !skipped
console = all, !skipped, !saved
append = "/var/lib/bacula/log" = all, !skipped
}

Pool {
Name = Default
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 8 days # one year
Maximum Volumes = 15
Purge Oldest Volume = Yes
}

Console {
Name = backup-mon
Password = "pw"
CommandACL = status, .status
}

Elképzelhető h. én bénáztam el valamit, csak már fogalmam nincs h. mit. A fájlok a stat szerint nem változnak (mtime, atime, stb.).

Köszi a segítséget!

Zoli

Hozzászólások

Van egyaltalan mukodo, jol lefutott mentesed? Mert nekem igy elsore az ugrana be, hogy azert upgradel, mert igazabol nem is futott le sikeresen. Nezz bele bconsole-val a lelki vilagaba, hogy mit ment le.

Többször teszteltem úgy h. minden job-ot kilőttem belőle, lefutott az első full, majd megint nyomta az Full-t, mikor szépen, időben lefutott már előtte a Full.
Azért ciki, mert a full mentés cc. 3 szalag, ezt minden nap lefuttatni elég nagy baromság, mikor ~20G változás van max.


Scheduled Jobs:
Level Type Pri Scheduled Name Volume
===================================================================================
Incremental Backup 10 12-Oct-12 02:05 WeeklyIncremental ULT0013
====

Running Jobs:
Console connected at 11-Oct-12 10:53
No Jobs running.
====

Terminated Jobs:
JobId Level Files Bytes Status Finished Name
====================================================================
106 Full 1,436,528 960.5 G OK 21-Sep-12 01:37 WeeklyIncremental
107 Incr 1,380,690 961.2 G OK 22-Sep-12 01:34 WeeklyIncremental
108 Incr 1,387,332 963.5 G OK 25-Sep-12 18:07 WeeklyIncremental
109 Incr 1,398,517 966.5 G OK 27-Sep-12 18:00 WeeklyIncremental
110 Incr 1,403,105 966.1 G OK 29-Sep-12 01:20 WeeklyIncremental
111 Incr 1,410,665 968.0 G OK 02-Oct-12 16:34 WeeklyIncremental
112 Incr 1,415,144 967.1 G OK 03-Oct-12 22:29 WeeklyIncremental
113 Full 1,482,414 973.4 G OK 05-Oct-12 01:39 WeeklyIncremental
114 Incr 1,431,204 971.8 G OK 08-Oct-12 19:31 WeeklyIncremental
115 Incr 1,444,152 987.2 G OK 10-Oct-12 21:57 WeeklyIncremental

Látod, az a gond h. a bacula jól csinálná a dolgát, mert a job-ot nem upgrade-eli Fullra, de mégis 980G a mentés. A probléma, hogy fogalmam sincs h. miért.

Olyannyira nem változnak h. nagyon :)
Bár esetemben ami nem változott az egy hardlink, esetleg ez kavarhat be, de nem találtam erre utaló panaszokat google szinten.


root@backup:/srv/backup/fs-mail/.sync# ls -acl jupiter_data/
drwxr-xr-x 36 root root 4096 Jul 25 18:00 .
drwxr-xr-x 6 root root 4096 Oct 11 16:12 ..
drwxr-xr-x 2 root root 4096 Oct 11 16:00 .AppleDB
drwxr-xr-x 2 root 10000 4096 Oct 11 13:00 .AppleDesktop
drwxrwx--- 3 root root 4096 Jul 25 18:00 backup

Természetesen még van cc. 30 könyvtár, de ebből látszik h. van olyan ami szép "új" ctime-al rendelkezik és van olyan ami megnyugtatóan régi inkrementális mentés szempontjából.

Egy konkrét példa:


root@backup:/srv/backup/fs-mail/.sync/jupiter_data/webdevshare# stat editorsLista.txt
File: `editorsLista.txt'
Size: 997 Blocks: 8 IO Block: 4096 regular file
Device: fe04h/65028d Inode: 42734479 Links: 38
Access: (0770/-rwxrwx---) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2012-10-08 20:30:41.349800519 +0200
Modify: 2011-05-11 14:22:22.000000000 +0200
Change: 2012-10-12 10:13:49.818050818 +0200

mtime eléggé rendben van ezek szerint.

Óba... ezen átsiklottam.
Bacula nézegeti a ctime-ot is, teljesen igazad van.

Megoldás, az utókor részére ha belefuttok ilyesmibe:


FileSet {
Name = "Full Set"
Include {
Options {
signature = MD5
mtimeonly=yes # csak az mtime-ot figyelje az fd
}
File = /srv/backup/libra/.sync/
File = /srv/backup/fs-mail/.sync/
}
}

Remélem bejön :)