无法使用 Bacula 备份 Windows 目录

无法使用 Bacula 备份 Windows 目录

备份和恢复在 Linux 上进行

Bacula 的导演(目录)、文件守护进程 (FD) 和存储守护进程 (标准差) 已安装在 Linux 主机上,已运行备份,并且可以恢复文件。

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 上:

在此处输入图片描述

无法统计“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

答案1

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

在此处输入图片描述

  1. 添加 Windows 客户端 (FD)复制到 /etc/bacula/bacula-dir.conf,方法是复制 linuxFD并将 localhost 更改为 IP2 或 FQDN2
  2. 将作业部分中的客户端更改为FD
  3. 将 FileSet 中的文件更改或添加到例如 c:/temp
  4. 检查linux主机的IP1或者FQDN1是否已经配置为标准差主机(应避免使用 localhost 作为外部功能失调无法访问)
  5. 重新启动目录标准差
  6. 跑步sudo bconsole
  7. 执行状态客户端并选择 Windows 客户端
  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
  ...
}

答案2

File = C:\\test

或者

File = C:\\temp

使用\\

相关内容