无法统计 /var/lib/bacula/bacula.sql:ERR=没有此文件或目录

无法统计 /var/lib/bacula/bacula.sql:ERR=没有此文件或目录

在我的 Bacula 安装中运行 BackupCatalog 作业时,它会抛出以下警告:

Could not stat /var/lib/bacula/bacula.sql: ERR=No such file or directory

我已经手动运行了它:

/etc/bacula/scripts/make_catalog_backup bacula bacula

它确实创建了 /var/lib/bacula/bacula.sql,但是当我运行该作业时,它被删除了。有什么想法吗?

整个输出如下所示:

15-Dec 17:50 u2.simplificator.com-dir JobId 13: BeforeJob: run command "/etc/bacula/scripts/make_catalog_backup bacula bacula"
*
15-Dec 17:50 u2.simplificator.com-dir JobId 13: Start Backup JobId 13, Job=BackupCatalog.2010-12-15_17.50.31.15
15-Dec 17:50 u2.simplificator.com-dir JobId 13: Using Device "FileStorage"
15-Dec 17:50 u4.simplificator.com-sd JobId 13: Volume "u4-0044" previously written, moving to end of data.
15-Dec 17:50 u4.simplificator.com-sd JobId 13: Ready to append to end of Volume "u4-0044" size=487818529
15-Dec 17:50 u2.simplificator.com-fd JobId 13:      Could not stat /var/lib/bacula/bacula.sql: ERR=No such file or directory
15-Dec 17:50 u4.simplificator.com-sd JobId 13: Job write elapsed time = 00:00:01, Transfer rate = 0  bytes/second
15-Dec 17:50 u2.simplificator.com-dir JobId 13: Bacula u2.simplificator.com-dir 2.4.4 (28Dec08): 15-Dec-2010 17:50:38
  Build OS:               x86_64-pc-linux-gnu debian lenny/sid
  JobId:                  13
  Job:                    BackupCatalog.2010-12-15_17.50.31.15
  Backup Level:           Full
  Client:                 "u2.simplificator.com-fd" 2.4.4 (28Dec08) x86_64-pc-linux-gnu,debian,lenny/sid
  FileSet:                "Catalog" 2010-12-15 17:48:31
  Pool:                   "u4-pool" (From Job resource)
  Storage:                "u4.simplificator.com-sd" (From Job resource)
  Scheduled time:         15-Dec-2010 17:50:30
  Start time:             15-Dec-2010 17:50:36
  End time:               15-Dec-2010 17:50:38
  Elapsed time:           2 secs
  Priority:               11
  FD Files Written:       0

更新:我尝试以 bacula 身份运行该命令,以确保没有权限错误,并且它有效。我这样做了:

sudo -u bacula /etc/bacula/scripts/make_catalog_backup bacula bacula

答案1

听起来像是权限或环境问题。cron 作业是否以 root 身份运行?尝试在/etc/bacula/scripts/make_catalog_backup脚本中添加一些调试消息,以捕获它创建文件的位置以及是否存在任何错误。

相关内容