Copy

Bacula 複印作業找不到設備

  • November 25, 2013

我在現場有一台 bacula 伺服器,它定期備份我的所有伺服器。現在我正在嘗試創建應將所有完整備份複製到異地的複製作業。但我仍然收到錯誤:

設備“FileStorage”不在 SD 設備資源中。

這很奇怪,因為現場儲存設備被稱為:FileStorage,而非現場儲存設備是:OffsiteFileStorage。(如果我重命名異地設備,作業將掛起)如果我嘗試定期備份到異地儲存,一切正常。

配置文件:

bacula-storage.conf(現場)

Storage {
 Name = Offsite
   Address = offsite.example.com
   SDPort = 9103
   Password = "password"
   Device = "OffsiteFileStorage"
   Media Type = File
   }


Storage {
 Name = File
   Address = bacula.example.com
   SDPort = 9103
   Password = "password"
   Device = FileStorage
   Media Type = File
   }

Pool {
 Name = Server-Full-Pool
 Pool Type = Backup
 Storage = File
 Recycle = yes
 AutoPrune = yes
 Volume Retention = 6 months
 Maximum Volumes = 40 # Limit number of Volumes in Pool
 Maximum Volume Bytes = 10G
 LabelFormat = "Server-Full"
 RecyclePool = Scratch
 Next Pool = Offsite-Pool
 Cleaning Prefix = "CLN"
 }

Pool {
   Name = Offsite-Pool
   Pool Type = Backup
   Storage = Offsite
   Volume Use Duration = 1 day
   Volume Retention = 6 months
   Scratch Pool = Offsite-Scratch
   RecyclePool = Offsite-Scratch
   File Retention =  1 year
   Job Retention =  1 year
   LabelFormat = "Copy-full"
   Cleaning Prefix = "CLN"
   }

Job {
   Name = "OffsiteCopyFull"
   Type = Copy
   Pool = Server-Full-Pool
   Schedule = "WeeklyOffsiteCopy"
   Client = None
   FileSet = None
   Selection Type = PoolUncopiedJobs
   Maximum Concurrent Jobs = 1
   Storage = Offsite
   Messages = Standard
   Priority = 10
   Write Bootstrap = "/var/spool/bacula/offsite-copy-%c.bsr"
   }

Schedule {
 Name = "WeeklyOffsiteCopy"
 Run = Full tue at 11:02
}

Client {
 Name = None
 Address = localhost
 Catalog = MyCatalog
 Password = "NoNe"          # password for FileDaemon
}

FileSet {
 Name = None
 Include {
     Options {
        signature = MD5
     }
 }
}

bacula-sd.conf(現場)

Storage {                             # definition of myself
 Name = bacula-sd
 SDPort = 9103                  # Director's port
 WorkingDirectory = "/var/spool/bacula"
 Pid Directory = "/var/run"
 Maximum Concurrent Jobs = 20
 Heartbeat Interval = 1 Minute            # Prevents timeouts
}

Director {
 Name = bacula-dir
 Password = "password"
}

Device {
 Name = FileStorage
 Media Type = File
 Archive Device = /storage/raid5/BACKUP/
 LabelMedia = yes;                   # lets Bacula label unlabeled media
 Random Access = Yes;
 AutomaticMount = yes;               # when device opened, read it
 RemovableMedia = no;
 AlwaysOpen = no;
}

bacula-sd.conf(異地)

Storage {                             # definition of myself                                                                                                                                                       
 Name = bacula-sd                                                                                                                                                                                                 
 SDPort = 9103                  # Director's port                                                                                                                                                                 
 WorkingDirectory = "/var/spool/bacula"                                                                                                                                                                           
 Pid Directory = "/var/run"                                                                                                                                                                                       
 Maximum Concurrent Jobs = 20                                                                                                                                                                                     
 Heartbeat Interval = 1 Minute            # Prevents timeouts                                                                                                                                                     
}                                                                                                                                                                                                                  

Director {                                                                                                                                                                                                         
 Name = bacula-dir                                                                                                                                                                                                
 Password = "password"                                                                                                                                                                                     
}                                                                                                                                                                                                                  


                                                                                                                                                                                                                Device {                                                                                                                                                                                                           
 Name = OffsiteFileStorage                                                                                                                                                                                        
 Media Type = File                                                                                                                                                                                                
 Archive Device = /Backup/Offsite/                                                                                                                                                                                
 LabelMedia = yes;                   # lets Bacula label unlabeled media                                                                                                                                          
 Random Access = yes;                                                                                                                                                                                             
 AutomaticMount = yes;               # when device opened, read it                                                                                                                                                
 RemovableMedia = no;                                                                                                                                                                                             
 AlwaysOpen = no;                                                                                                                                                                                                 
}   

AFAIK 在儲存守護程序之間複製作業仍然是不可能的。

是的,此時。目前,遷移和復製作業都被限制為使用單個 SD 作為源和目標,因為 Bacula 中目前沒有協議可以讓一個 SD 直接與另一個 SD 通信。(請參閱此處的第二個答案:http: //bacula.10910.n7.nabble.com/Migration-Copy-jobs-from-Storage-daemon-to-another-td66239.html

我想到的唯一解決方案是使用一些較低級別的協議(如 nfs)安裝異地位置,並從源伺服器上的同一個儲存守護程序中使用它。

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