Hi Kjetil
Looking for between emails old of the list, I found this answer that I
had not read:
On Thursday, 02 October 2008 02:50:47 +0200,
Kjetil Torgrim Homme wrote:
> > 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.
Thanks for the tip.
> > 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.
The solution with sed works as your you indicate to me. The simple fact
to add trailing "/." does that _all_ symlinks in these directories are
followed?
With respect to the solution with find, it seems that it is having a
behavior different from that you indicate. According to I read in the
find man pages, %l talks about the object of symbolic link and empty
string if file is not a symbolic link). The correct thing would be to
use -L flag?
Thank for your reply.
Regards,
Daniel
--
Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Squeeze - Linux user #188.598
signature.asc
Description: Digital signature
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|