Bacula-users

Re: [Bacula-users] Following symlinks

2008-10-04 17:01:20
Subject: Re: [Bacula-users] Following symlinks
From: Kjetil Torgrim Homme <kjetilho AT linpro DOT no>
To: bacula-users AT lists.sourceforge DOT net
Date: Thu, 02 Oct 2008 02:50:47 +0200
Daniel Bareiro <daniel-listas AT gmx DOT net> writes:

> C M Reinehr wrote:
>> This question was answered just a couple of weeks ago by Kjetil T.
>> Homme. I quote:
>
>> to force Bacula to follow the symlink, you must add /. to the name.
>
> Very interesting tip! :-)
>
> The point is the File option don't indicate links specifically, but of
> the following way:
>
> FileSet {
>   Name = "BackupStandar"
>   Include {
>     Options {
>       signature = SHA1
>     }
>     File = /etc
>     File = "\\|bash -c \"find /space/ -name backup -o -name log\""
>   }
> }

you will want/need "Ignore FileSet Changes = yes" if you intend to do
differential or incremental backups.

> Where the client can have a /space/log and/or /space/backup and the
> symlink can be in some subirectory of them. With this declaration of
> File, how I could force backup of symlinks?

if you have GNU find, try

   "\\|find /space/ -name backup -o -name log -printf '%l\\n'"

(the bash -c "" is superfluous here since you're not using quoting or
pipes in your command.)

%l (small L) expands to what the symlink points to.  if you don't have
GNU find, use sed to add the trailing "/.", something like

   "\\|sh -c \"find /space/ -name backup -o -name log | sed s,$,/.,\""

note that the sed solution will also handle the case where /space/log
points to another symlink.

-- 
regards,          | Redpill  _
Kjetil T. Homme   | Linpro  (_)


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Bacula-users] Following symlinks, Kjetil Torgrim Homme <=