I have conf for bacula. I try remove files after job, but it don't work:(
Part my 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/
}
}
In message this ok:
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):
How to fix it?
PS. I think trouble be permission. But not have idea how to fix it