无法使用Bacula备份Windows目录

备份和恢复在Linux上工作

在Linux主机上安装了Bacula的Director( DIR ),File Daemon( FD )和Storage Daemon( SD )后,备份已经运行,文件可以恢复。

Windows上的备份失败

下一步是备份驻留在Windows上的文件。 FD已安装并在Windows上运行:

C:\Program Files\Bacula>netstat -nat | grep 91 TCP 0.0.0.0:9102 0.0.0.0:0 LISTENING InHost TCP 0.0.0.0:9102 0.0.0.0:0 LISTENING InHost 

Telnet指出,Windows主机可以连接到Linux上的DIRSD

在这里输入图像说明

无法统计“c:\ temp”:ERR =没有这样的文件或目录

 C:\Program Files\Bacula>bconsole Connecting to Director IP1:9101 1000 OK: bacula-dir Version: 5.0.0 (26 January 2010) Enter a period to cancel a command. *run Automatically selected Catalog: MyCatalog Using Catalog "MyCatalog" A job name must be specified. The defined Job resources are: 1: BackupClient1 2: BackupCatalog 3: RestoreFiles Select Job resource (1-3): *1 Run Backup job JobName: BackupClient1 Level: Incremental Client: bacula-fd FileSet: Full Set Pool: File (From Job resource) Storage: File (From Job resource) When: 2014-08-28 21:55:37 Priority: 10 OK to run? (yes/mod/no): *yes Job queued. JobId=16 You have messages. *messages 28-Aug 21:42 bacula-dir: ERROR in authenticate.c:304 UA Hello from client:IP1:PORT is invalid. Len=-4 28-Aug 21:55 bacula-dir JobId 16: Start Backup JobId 16, Job=BackupClient1.2014- 08-28_21.55.41_09 28-Aug 21:55 bacula-dir JobId 16: Using Device "FileStorage" 28-Aug 21:55 bacula-sd JobId 16: Volume "hello" previously written, moving to en d of data. 28-Aug 21:55 bacula-sd JobId 16: Ready to append to end of Volume "hello" size=5 6881490 28-Aug 21:55 bacula-fd JobId 16: Could not stat "c:\temp": ERR=No such file or directory 28-Aug 21:55 bacula-sd JobId 16: Job write elapsed time = 00:00:01, Transfer rat e = 0 Bytes/second 28-Aug 21:55 bacula-dir JobId 16: Bacula bacula-dir 5.0.0 (26Jan10): 28-Aug-2014 21:55:44 Build OS: x86_64-redhat-linux-gnu redhat (Carbon) JobId: 16 Job: BackupClient1.2014-08-28_21.55.41_09 Backup Level: Incremental, since=2014-08-28 21:22:07 Client: "bacula-fd" 5.0.0 (26Jan10) x86_64-redhat-linux-gnu,re dhat,(Carbon) FileSet: "Full Set" 2014-08-28 20:36:03 Pool: "File" (From Job resource) Catalog: "MyCatalog" (From Client resource) Storage: "File" (From Job resource) Scheduled time: 28-Aug-2014 21:55:37 Start time: 28-Aug-2014 21:55:44 End time: 28-Aug-2014 21:55:44 Elapsed time: 0 secs Priority: 10 FD Files Written: 0 SD Files Written: 0 FD Bytes Written: 0 (0 B) SD Bytes Written: 0 (0 B) Rate: 0.0 KB/s Software Compression: None VSS: no Encryption: no Accurate: no Volume name(s): Volume Session Id: 4 Volume Session Time: 1409258126 Last Volume Bytes: 56,881,890 (56.88 MB) Non-fatal FD errors: 1 SD Errors: 0 FD termination status: OK SD termination status: OK Termination: Backup OK -- with warnings 28-Aug 21:55 bacula-dir JobId 16: Begin pruning Jobs older than 44 years 2 month s 10 days 21 hours 55 mins 44 sec. 28-Aug 21:55 bacula-dir JobId 16: No Jobs found to prune. 28-Aug 21:55 bacula-dir JobId 16: Begin pruning Jobs. 28-Aug 21:55 bacula-dir JobId 16: No Files found to prune. 28-Aug 21:55 bacula-dir JobId 16: End auto prune. * 

为什么FD表示c:\ temp不能备份,而存在?

 C:\Program Files\Bacula>dir c:\ | findstr temp 08/25/2014 12:40 AM <DIR> temp 

Could not stat "c:\temp": ERR=No such file or directoryc:\temp存在则表示由于某种原因无法find该目录。 原因是FD应该运行在备份主机上。

在这里输入图像说明

  1. 通过复制linux FD并将localhost更改为IP2或FQDN2,将Windows客户端( FD )添加到/etc/bacula/bacula-dir.conf
  2. 将位于“作业”部分的客户端更改为FD的名称
  3. 将位于FileSet中的文件更改或添加到例如c:/ temp
  4. 检查linux主机的IP1或FQDN1是否configuration为SD主机(由于外部FD无法访问,应避免使用本地主机)
  5. 重新启动DIRSD
  6. 运行sudo bconsole
  7. 执行状态客户端并selectWindows客户端
  8. 执行Bacula命令来备份和恢复Windows文件

/etc/bacula/bacula-dir.conf

 JobDefs { Name = "DefaultJob" Type = Backup Level = Incremental Client = utrecht-fd FileSet = "Full Set" ... } Client { Name = utrecht-fd Address = IP2 FDPort = 9102 ... } Storage { Name = File Address = IP1 SDPort = 9103 ... Device = FileStorage ... } FileSet { Name = "Full Set" ... File = c:/test ... } 
 File = C:\\test 

要么

 File = C:\\temp 

使用\\