Thanks Spadajspadaj,

You're absolutely right, I haven't read the docs carefully.
With your useful hints, the test backup was successful.
Thanks also for your opinion about placing the command into a file,
placed on the client.
This would be a good solution for database backup on the next step about
learning to work with Bareos.

Thanks a lot, Frank

Am 25.12.2020 um 15:18 schrieb Spadajspadaj:
>
> 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/7c4cee64-b033-aaf8-532e-cff8a4c8f632%40celebrate.de.

Reply via email to