Temat: Bacula - recykling volumenow
Tworząc tak wiele z jednej strony masz elastyczność, że możesz się pozbyć tylko wybranego Joba, jeżeli potrzebujesz miejsca, ale robi się to problematyczne w zarządzaniu. Ustawiając Maximum Volumes skazujesz się na sytuację, że jak dołączysz nowego klienta, to zabraknie ci woluminów w pulach. Nie wiem też, jak zachowa się retencja przy twoim szczegółowym ustawieniu nazw woluminów. W twoim przypadku zaczęła sypać błędami. Ustawienie
Label Format = ${Client}-${Level}- powinno być ok.
Ja trochę inaczej podszedłem do sprawy. Zamiast dla każdego Job'a tworzyć nowy plik, mam zestaw plików które przechowują backupy:
* pełne z danego miesiąca (Full-)
* przyrostowe z danego tygodnia (Diff-)
* backupy przyrostowe z danego tygodnia (Inc-) - wszystkie joby w jednym pliku
* backupy z baz danych przechowywane są w odrębnej puli (DB-), ze względu na rozmiar mają krótszy czas retencji.
* wszystko jest kopiowane na taśmę (Job typu Copy do Tape-Pool).
Recovery z dokładnością do danego dnia mogę zrobić 2 miesiące wstecz, z dokładnością do tygodnia przez 3 miesiące wstecz. Powyżej tego mam do dyspozycji jeszcze tasiemki, które powinny przechowywać min. 1 rok, z czego dane o Job trzymane są w katalogu przez 6 miesięcy. Powinno być wystarczająco długo.
W moim rozwiązaniu mam 9 klientów oraz 19 zadań backupu. Wszystko śmiga od ponad roku bez żadnych problemów. Najnowszy JobId przekroczył już 10k, w katalogu jest info o 4,7k Job'ach.
Mam ustawione tak:
# Default pool definition
Pool {
Name = Default
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Use Duration = 1 month
Volume Retention = 3 months # 3 months
Label Format = Default-
Maximum Volumes = 4
Storage = File
}
# Scratch pool definition
Pool {
Name = Scratch
Pool Type = Backup
}
# Batabase backups
Pool {
Name = DB-Pool
Pool Type = Backup
Recycle = yes
AutoPrune = yes
Volume Use Duration = 1 week
Volume Retention = 1 month
Next Pool = Tape-Pool
Migration Time = 1 week
Label Format = DB-
Maximum Volumes = 6
Storage = File
}
# Pool for Level Full backups
Pool {
Name = Full-Pool
Pool Type = Backup
Recycle = yes
AutoPrune = yes
Volume Use Duration = 4 weeks
Volume Retention = 3 months
Next Pool = Tape-Pool
Migration Time = 1 month
Label Format = Full-
Maximum Volumes = 4
Storage = File
}
# Pool for Level Differential backups
Pool {
Name = Diff-Pool
Pool Type = Backup
Recycle = yes
AutoPrune = yes
Volume Use Duration = 1 week
Volume Retention = 13 weeks
Next Pool = Tape-Pool
Migration Time = 3 weeks
Label Format = Diff-
Maximum Volumes = 15
Storage = File
}
# Pool for Level Incremental backups
Pool {
Name = Inc-Pool
Pool Type = Backup
Recycle = yes
AutoPrune = yes
Volume Use Duration = 1 week
Volume Retention = 9 weeks
Next Pool = Tape-Pool
Migration Time = 1 week
Label Format = Inc-
Maximum Volumes = 12
Storage = File
}
# Pool for migrate backups from disk to tape
Pool {
Name = Tape-Pool
Pool Type = Backup
Recycle = yes
AutoPrune = yes
Volume Retention = 12 months
Storage = LTO-2
}
# Pool for forensic disk images
Pool {
Name = Image-Pool
Pool Type = Backup
Recycle = no
AutoPrune = no
Volume Retention = 1 year
}
Woluminy wyglądają tak:
*list volumes
Pool: Default
No results to list.
Pool: Scratch
No results to list.
Pool: File-Pool
No results to list.
Pool: Tape-Pool
+---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten |
+---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| 1 | TAPE00 | Full | 1 | 209,882,179,584 | 1,793 | 15,552,000 | 1 | 0 | 0 | LTO-2 | 2010-10-03 21:18:31 |
| 2 | TAPE01 | Append | 1 | 79,791,280,128 | 1,357 | 15,552,000 | 1 | 0 | 0 | LTO-2 | 2011-02-05 21:17:19 |
| 3 | TAPE02 | Append | 1 | 64,512 | 0 | 15,552,000 | 1 | 0 | 1 | LTO-2 | 0000-00-00 00:00:00 |
| 4 | TAPE03 | Append | 1 | 64,512 | 0 | 15,552,000 | 1 | 0 | 1 | LTO-2 | 0000-00-00 00:00:00 |
| 5 | TAPE04 | Append | 1 | 64,512 | 0 | 15,552,000 | 1 | 0 | 1 | LTO-2 | 0000-00-00 00:00:00 |
| 6 | TAPE05 | Append | 1 | 64,512 | 0 | 15,552,000 | 1 | 0 | 1 | LTO-2 | 0000-00-00 00:00:00 |
+---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
Pool: Image-Pool
No results to list.
Pool: Full-Pool
+---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten |
+---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| 7 | Full-0007 | Used | 1 | 6,902,140,144 | 1 | 7,776,000 | 1 | 0 | 0 | File | 2010-10-06 21:06:45 |
| 10 | Full-0010 | Append | 1 | 3,024,413,353 | 0 | 7,776,000 | 1 | 0 | 0 | File | 2011-01-17 20:32:57 |
| 38 | Full-0038 | Used | 1 | 15,219,676,484 | 3 | 7,776,000 | 1 | 0 | 0 | File | 2010-12-05 20:16:34 |
| 41 | Full-0041 | Used | 1 | 11,224,387,113 | 2 | 7,776,000 | 1 | 0 | 0 | File | 2011-01-02 20:20:48 |
+---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
Pool: Diff-Pool
+---------+------------+-----------+---------+---------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten |
+---------+------------+-----------+---------+---------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| 12 | Diff-0012 | Used | 1 | 435,519,713 | 0 | 7,862,400 | 1 | 0 | 0 | File | 2011-01-23 20:02:19 |
| 15 | Diff-0015 | Append | 1 | 4,189,297,075 | 0 | 7,862,400 | 1 | 0 | 0 | File | 2011-01-30 20:19:23 |
| 18 | Diff-0018 | Used | 1 | 2,132,635,700 | 0 | 7,862,400 | 1 | 0 | 0 | File | 2010-10-31 20:05:51 |
| 21 | Diff-0021 | Used | 1 | 133,119,662 | 0 | 7,862,400 | 1 | 0 | 0 | File | 2010-11-14 20:01:54 |
| 23 | Diff-0023 | Used | 1 | 1,057,664,090 | 0 | 7,862,400 | 1 | 0 | 0 | File | 2010-11-28 20:02:15 |
| 24 | Diff-0024 | Used | 1 | 323,388,615 | 0 | 7,862,400 | 1 | 0 | 0 | File | 2010-11-28 20:04:47 |
| 26 | Diff-0026 | Used | 1 | 113,521,957 | 0 | 7,862,400 | 1 | 0 | 0 | File | 2010-12-12 20:01:15 |
| 30 | Diff-0030 | Used | 1 | 166,456,819 | 0 | 7,862,400 | 1 | 0 | 0 | File | 2010-12-19 20:01:29 |
| 32 | Diff-0032 | Used | 1 | 232,340,180 | 0 | 7,862,400 | 1 | 0 | 0 | File | 2010-12-26 20:01:40 |
| 34 | Diff-0034 | Used | 1 | 304,131,438 | 0 | 7,862,400 | 1 | 0 | 0 | File | 2011-01-09 20:01:58 |
| 37 | Diff-0037 | Used | 1 | 465,182,492 | 0 | 7,862,400 | 1 | 0 | 0 | File | 2011-01-16 20:02:31 |
+---------+------------+-----------+---------+---------------+----------+--------------+---------+------+-----------+-----------+---------------------+
Pool: Inc-Pool
+---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten |
+---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| 11 | Inc-0011 | Used | 1 | 732,786,007 | 0 | 5,443,200 | 1 | 0 | 0 | File | 2011-01-25 21:06:20 |
| 13 | Inc-0013 | Used | 1 | 15,332,909,843 | 3 | 5,443,200 | 1 | 0 | 0 | File | 2011-02-01 21:18:39 |
| 16 | Inc-0016 | Append | 1 | 9,542,795,269 | 2 | 5,443,200 | 1 | 0 | 0 | File | 2011-02-05 21:06:38 |
| 25 | Inc-0025 | Used | 1 | 878,438,970 | 0 | 5,443,200 | 1 | 0 | 0 | File | 2010-11-30 21:06:07 |
| 27 | Inc-0027 | Used | 1 | 206,945,260 | 0 | 5,443,200 | 1 | 0 | 0 | File | 2010-12-07 21:06:05 |
| 28 | Inc-0028 | Used | 1 | 299,882,541 | 0 | 5,443,200 | 1 | 0 | 0 | File | 2010-12-14 21:06:11 |
| 29 | Inc-0029 | Used | 1 | 249,167,426 | 0 | 5,443,200 | 1 | 0 | 0 | File | 2010-12-21 21:06:11 |
| 31 | Inc-0031 | Used | 1 | 293,128,940 | 0 | 5,443,200 | 1 | 0 | 0 | File | 2010-12-28 21:06:12 |
| 33 | Inc-0033 | Used | 1 | 471,518,422 | 0 | 5,443,200 | 1 | 0 | 0 | File | 2011-01-04 21:06:08 |
| 35 | Inc-0035 | Used | 1 | 412,089,163 | 0 | 5,443,200 | 1 | 0 | 0 | File | 2011-01-11 21:06:12 |
| 36 | Inc-0036 | Used | 1 | 515,780,139 | 0 | 5,443,200 | 1 | 0 | 0 | File | 2011-01-18 21:06:22 |
+---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
Pool: DB-Pool
+---------+------------+-----------+---------+-------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten |
+---------+------------+-----------+---------+-------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| 9 | DB-0009 | Used | 1 | 213,813,335 | 0 | 2,592,000 | 1 | 0 | 0 | File | 2011-01-09 21:10:19 |
| 17 | DB-0017 | Used | 1 | 161,314,618 | 0 | 2,592,000 | 1 | 0 | 0 | File | 2011-01-24 20:00:31 |
| 19 | DB-0019 | Used | 1 | 165,097,019 | 0 | 2,592,000 | 1 | 0 | 0 | File | 2011-01-31 21:06:24 |
| 20 | DB-0020 | Append | 1 | 145,639,111 | 0 | 2,592,000 | 1 | 0 | 0 | File | 2011-02-05 21:10:15 |
| 22 | DB-0022 | Used | 1 | 161,648,942 | 0 | 2,592,000 | 1 | 0 | 0 | File | 2011-01-02 21:10:18 |
| 40 | DB-0039 | Used | 1 | 220,863,889 | 0 | 2,592,000 | 1 | 0 | 0 | File | 2011-01-17 20:00:29 |
+---------+------------+-----------+---------+-------------+----------+--------------+---------+------+-----------+-----------+---------------------+
*