我对 bacula 有信心。我尝试在工作后删除文件,但它不起作用:(
部分我的conf:
Job {
Name = "spass.mysql"
Type = Backup
Level = Full
Client = spass-fd
RunScript {
RunsWhen = Before
FailJobOnError = No
RunsOnClient = Yes
Command = "/usr/bin/mysqldump -EB syspass --result-file /tmp/syspass-%i.sql"
}
Client Run After Job = "/usr/bin/rm -f /tmp/*.sql"
Schedule = "WorkTimeEveryHour"
Storage = File-spass
Pool = spass
FileSet="spass.mysql"
Messages = Standard
Priority = 10
Write Bootstrap = "/var/spool/bacula/%c_%n_%e.bsr"
}
FileSet {
Name = "spass.mysql"
Include {
Options {
signature = MD5
compression = GZIP
wildfile = "*.sql"
}
Options {
Exclude = yes
RegexFile = ".*"
RegexDir = ".*"
}
File = /tmp/
}
}
在消息中可以:
14-Jun 17:02 bnode10-dir JobId 364: Start Backup JobId 364, Job=spass.mysql.2017-06-14_17.02.09_10
14-Jun 17:02 bnode10-dir JobId 364: Using Device "FileStorage-spass" to write.
14-Jun 17:02 spass-fd JobId 364: shell command: run ClientBeforeJob "/usr/bin/mysqldump -EB syspass --result-file /tmp/syspass-364.sql"
14-Jun 17:02 bacula-sd JobId 364: Volume "spass0006" previously written, moving to end of data.
14-Jun 17:02 bacula-sd JobId 364: Ready to append to end of Volume "spass0006" size=995952259
14-Jun 17:02 spass-fd JobId 364: shell command: run ClientAfterJob "/usr/bin/rm -f /tmp/*.sql"
14-Jun 17:02 bacula-sd JobId 364: Elapsed time=00:00:01, Transfer rate=200.8 K Bytes/second
14-Jun 17:02 bnode10-dir JobId 364: Bacula bnode10-dir 5.2.13 (19Jan13):
如何解决?
PS。我认为麻烦是许可。但不知道如何解决它