First of all, you didn't the docs carefully.
If you say 'File = "|command"', said command will be run by the
director, on the director machine and - what's important if it's the
same machine - in the context of bareos-dir user.
So if you want to run the comand on the client, you have to give it not
as "|command", but as "\\|command".
Additionally to that you might - depending on your installation -
encounter some problems with PATH variable or proper escaping so I'd
suggest wrapping your command into a simple script, putting it in
/usr/local/sbin on the client machine (let's say - myscript.sh) and
putting 'File = "\\|/usr/local/sbin/myscript.sh"' into the fileset resource.
On 25/12/2020 12:11, 'Frank Cherry' via bareos-users wrote:
Hello there,
my goal is, to backup only files, created of today.
This is my FileSet:
FileSet {
Name = "Storage1PVE"
Description = "PVE backups from GlusterFS"
Include {
Options {
Signature = MD5 # calculate md5 checksum per file
Compression = LZ4
noatime = yes
}
File = "|sh -c 'find /mnt/glusterfs/pve_dump/dump/ -type f -mtime
-1 -name \"*.zst\"'"
}
}
When I execute it on the client, I get display the right files.
But when I start a job in Bareos, I get:
bareos-dir JobId 13: Fatal error: Error running program: sh -c 'find
/mnt/glusterfs/pve_dump/dump/ -type f -mtime -1 -name "*.zst"'.
ERR=Child exited with code 1
Followed the instructions on:
https://docs.bareos.org/Configuration/Director.html#fileset-include
<https://docs.bareos.org/Configuration/Director.html#fileset-include>
What I'm doing wrong?
--
You received this message because you are subscribed to the Google
Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/bareos-users/c5806bea-9612-4e96-8bf9-9c5a2251f845n%40googlegroups.com
<https://groups.google.com/d/msgid/bareos-users/c5806bea-9612-4e96-8bf9-9c5a2251f845n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/bareos-users/6a844e2e-65fc-372b-923e-da61adc4dafe%40gmail.com.