Correct, it never follows symlinks.  The only data backed up for a symlink is
the filename that it points to ("../../usr/lib64/httpd/modules" in your
example below).

On restore, Bacula creates a new symlink containing that filename.  I'm not
sure how that will break things.

The "Permission denied" error could be caused by couple of other things:

1) The SELinux configuration: try turning SELinux off (e.g. run setenforce
Permissive after booting or edit /etc/sysconfig/selinux and reboot).

2) Check that you don't have /etc/httpd referenced twice in your fileset
somehow (e.g. by having File = / and File = /etc).  You can check using the
bconsole "list files jobid=..." command.

__Martin

PS. please keep the list CC'd so everyone can contribute.




>>>>> On Thu, 24 Aug 2017 10:46:40 +0200, Levi Hen said:
> 
> Let me rephrase, it doesn’t follow symlinks and backup the data there 
> (reference) if it is not manually added to the fileset right?
> 
> And we don’t want it to restore symlinks as that will break a lot of our 
> systems as we didn’t plan for that.
> 
> Clean Centos means: I literally spun up a new vps, installed it and then ran 
> the restore job.
> 
> I am new to bacula though so maybe I missed something in the documentation or 
> guides.
> 
> I now see it only errored with 136 files out of +85K btw
> 
> 
> From: Martin Simmons
> Sent: Wednesday, August 23, 2017 18:56
> To: Levi Hen
> Cc: Bacula-users@lists.sourceforge.net
> Subject: Re: [Bacula-users] Bacula director reporting symlink errors.
> 
>>>>> On Wed, 23 Aug 2017 16:54:26 +0200, Levi Hen said:
> > 
> > Bacula seems to be trying to restore symlinks (something I thought was 
> > impossible) judging by the message below:
> > 
> > 23-Aug 16:19 bacula-fd JobId 3053: Error: create_file.c:305 Could not 
> > symlink /tmp/bacula-restores/etc/httpd/modules -> 
> > ../../usr/lib64/httpd/modules: ERR=Permission denied
> 
> Bacula always restores symlinks if they are backed up.  Why do you think it is
> impossible?
> 
> 
> > And it does this for every single file as far as I know/checked.
> > 
> > The backup seems to restore the files as per usual in the 
> > /tmp/bacula-restores/ folder (haven’t checked if it they are actually 
> > working as it is still busy) but when I did the exact same restore of this 
> > fileset/client earlier last week it didn’t give me any errors.
> > 
> > Director is a Centos 6.4, bacula V5.0.0 R13.el6
> > Client is a clean Centos 7, bacula V5.2.13 R23.1.el7
> > 
> > Don’t get me wrong, that it is error-ing is a good thing (as long as the 
> > restore works) as we don’t want it to symlink (at least not this set) but 
> > we want to understand why and how this is happening.
> 
> Why don't you want it to symlink?
> 
> 
> > If anyone could shine some light on this we would be very happy.
> 
> Are you trying to restore over the existing files in /tmp/bacula-restores/?
> If you want a clean restore, I suggest deleting that folder first.  If the
> files did not exist last week then that would also explain why it didn't give
> any errors then.
> 
> __Martin
> 
> 
> 
> ---
> This email has been checked for viruses by AVG.
> http://www.avg.com
> 
> -- 
> 
> Follow Contezza on LinkedIn 
> <https://www.linkedin.com/company/contezza-informatiemanagement> or Twitter 
> <https://twitter.com/contezzaim>!

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to