Backup

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

  • September 8, 2021

我有一個關於在硬碟驅動器上使用 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-documentation 中找到了一個章節:它指出:“現在,由於這些不同類型的保存中的每一種都需要在不同的時期內保持有效,因此最簡單的方法(可能也是唯一的方法)是每種備份類型都有一個單獨的池。”。

我的問題:

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

我還閱讀了 bacula-documentation 中的基本工作,這不是正確的事情,但它朝著正確的方向發展。

非常感謝您抽出寶貴時間幫助閱讀。

Ps:我不是英語母語者,如果我犯了錯誤,我很抱歉。如果有什麼事情讓你很生氣,我想听聽你的意見,以提高我的英語水平。

謝謝你。

到目前為止,我已經在 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 上幫助我解決問題的每個人。

引用自:https://serverfault.com/questions/1076579