Bacula - 磁碟備份 GFS 方案“洞”

Bacula - 磁碟備份 GFS 方案“洞”

我有一個關於在硬碟上使用 bacula 實作 GFS 方案的問題(守護程式已經正常運作)。

我想要實現的目標:

每半年我想要一個至少可以存取 12 個月的完整備份 -> 我需要將備份保留得比 12 個月長一點,這樣第二個完整備份就不會覆蓋第一個。這意味著至少會有 3 個完整備份(我選擇了 18 個月)。這樣持續幾天、幾個月等等。簡單的 GFS 方案。

Schedule{
  Name = "GGFSCycle"
  Enabled = yes

  # DailyCycle - the volume is kept for 14 days
  Run = Level=Incremental Pool=DailyPool FullPool=HalfAnnualPool Priority=10 tuesday-sunday at 03:00

  # WeeklyCycle - the volume is kept for 5 weeks
  Run = Level=Incremental Pool=WeeklyPool FullPool=HalfAnnualPool Priority=11 monday at 03:00
  
  # MonthlyCycle - the volume is kept for 7 months
  Run = Level=Differential Pool=MonthlyPool FullPool=HalfAnnualPool Priority=12 february-june 1 at 03:00
  Run = Level=Differential Pool=MonthlyPool FullPool=HalfAnnualPool Priority=12 august-december 1 at 03:00

  # HalfAnnualCycle - the data is kept for 18 months
  Run = Level=Full Pool=HalfAnnualPool Priority=13 january 1 at 03:00
  Run = Level=Full Pool=HalfAnnualPool Priority=13 july 1 at 03:00

}

Pool {    
  Name = DailyPool
  Pool Type = Backup
  Storage = backup-server-sd
  Label Format = "DailyVol_"
  Volume Use Duration = 23 hours
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 14 days         
  Maximum Volume Bytes = 50M          # Limit Volume size to something reasonable
  Maximum Volumes = 1000              # Limit number of Volumes in Pool
  # -> max 50G
}

Pool {
  Name = WeeklyPool
  Pool Type = Backup
  Storage = backup-server-sd
  Label Format = "WeeklyVol_"
  Volume Use Duration = 23 hours
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 5 weeks
  Maximum Volume Bytes = 500M 
  Maximum Volumes = 80
  # -> max 70G
}

Pool {
  Name = MonthlyPool
  Pool Type = Backup
  Storage = backup-server-sd
  Label Format = "MonthlyVol_"
  Volume Use Duration = 2 days
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 7 months
  Maximum Volume Bytes = 5G
  Maximum Volumes = 80
  # -> max 170G
}
 
Pool {
  Name = HalfAnnualPool
  Pool Type = Backup
  Label Format = "HalfannualVol_"
  Storage = backup-server-sd
  Volume Use Duration = 3 days
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 18 months #1,5 years
  Maximum Volume Bytes = 35G
  Maximum Volumes = 20
  # -> max 700G
}

我看到的問題:

增量備份始終引用最後一次增量備份、差異備份或完整備份,並僅儲存自那時以來發生變更的檔案。在我的方案中,我有兩個「不同的」增量備份,每日備份和每週備份。每週的總是引用前一天發布的每日的,對嗎?當我將每週一份保留超過4 週(我選擇了5 週)而每日一份僅保留超過10 天(我選擇了14 天)時,每日文件將在14 天後被刪除,但每月一份仍然引用它們。那麼會有「洞」嗎?

我想通了,是否可以有多個“級別”的增量備份,就像我可以說每週增量備份僅引用每週備份(level0)而每日增量備份僅引用每日備份(level1) )問題就會消失。當我保留完整備份的時間較短時,也會出現相同的問題。例如,如果完整備份覆蓋了唯一現有的備份,則差異備份可以引用的完整備份將不復存在,並且我將丟失迄今為止所做的所有備份。

我發現了什麼:

我在網路上查了一下,發現了一個bacula 文檔中的章節:它指出:「現在,由於每種不同類型的保存都需要在不同的時期保持有效,因此最簡單的方法(也可能是唯一的方法)是為每種備份類型擁有一個單獨的池。」。

我的問題:

  1. 這基本上意味著除了 bacula 文件章節中的單一 full-、diff-和 inkr-pool 之外,沒有其他解決方案。它是否正確?
  2. 如果不正確,我如何使用兩個不同的增量池來實現我的目標?

我還在bacula文件中讀到了有關基礎工作的內容,這不是正確的事情,但它朝著正確的方向發展。

非常感謝您抽出寶貴時間幫忙閱讀本文。

PS:我的母語不是英語,如果我犯了錯誤,我很抱歉。如果有什麼事情真的讓你生氣,我想聽聽你的意見來提升我的英語能力。

謝謝。

答案1

到目前為止,我已經在 bacula-user-mailinglist 的幫助下解決了這個問題。不可能為單一作業有效地擁有多個增量池。我已將我的設定更改為:

Schedule{
  Name = "GFSCycle"
  Enabled = yes

  # DailyCycle - the volumes are kept for 40days
  Run = Level=Incremental Pool=DailyPool FullPool=HalfAnnualPool Priority=10 daily at 03:00
  
  # MonthlyCycle - the volumes are kept for 7months
  Run = Level=Differential Pool=MonthlyPool FullPool=HalfAnnualPool Priority=11 february-june 1 at 03:00
  Run = Level=Differential Pool=MonthlyPool FullPool=HalfAnnualPool Priority=11 august-december 1 at 03:00

  # HalfAnnualCycle - the volumes are kept 12months
  Run = Level=Full Pool=HalfAnnualPool Priority=12 january 1 at 03:00
  Run = Level=Full Pool=HalfAnnualPool Priority=12 july 1 at 03:00


Pool {    
  Name = DailyPool
  Pool Type = Backup
  Storage = backup-server-sd
  Label Format = "DailyVol_"
  Volume Use Duration = 23 hours
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 40 days
  Maximum Volume Bytes = 50M          # Limit Volume size to something reasonable
  Maximum Volumes = 3000              # Limit number of Volumes in Pool
  # -> max 150G
}

Pool {
  Name = MonthlyPool
  Pool Type = Backup
  Storage = backup-server-sd
  Label Format = "MonthlyVol_"
  Volume Use Duration = 2 days
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 7 months
  Maximum Volume Bytes = 5G
  Maximum Volumes = 80
  # -> max 170G
}
 
Pool {
  Name = HalfAnnualPool
  Pool Type = Backup
  Label Format = "HalfannualVol_"
  Storage = backup-server-sd
  Volume Use Duration = 3 days
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 12 months
  Maximum Volume Bytes = 35G
  Maximum Volumes = 20
  # -> max 700G 
}

此單一客戶端的文件和作業保留設定為最大磁碟區保留。

-> 文件保留 = 12 個月,作業保留 = 12 個月

還有虛擬完整備份可能會很方便,並且在以下位置有更詳細的說明: https://www.baculasystems.com/incremental-backup-software/

再次非常感謝 bacula-user-mailinglist 上幫助我解決這個問題的每個人。

相關內容