Bacula-users

Re: [Bacula-users] Two installation problems, btape & bacula-fd

2008-09-20 17:24:37
Subject: Re: [Bacula-users] Two installation problems, btape & bacula-fd
From: Arno Lehmann <al AT its-lehmann DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Sat, 20 Sep 2008 22:54:45 +0200
Hello,

20.09.2008 07:32, Jonathan Sachs wrote:
>   Early this month Arno Lehmann responded to my question about a 
> puzzling error I got when I tried to run the test job described in 
> section 9 of the Bacula manual.

Ah, ok, so I'll reply this time, too.

> Arno: I just found time to try again, and got different by similarly 
> puzzling results.
> 
> I took your advice to run bacula-dir in the foreground with a trace. To 
> cut to the chase, it worked perfectly.  I got a backup of my home 
> folder, and was able to restore it.
> 
> I noticed that bconsole said "Backup OK - with warnings." Looking upward 
> in the bconsole output, I found a line that said, "Non-fatal FD errors: 
> 1." Further upward, under the "label" command, I found "Could not stat 
> /home/jonathan/.gvfs: ERR=Permission denied." (As before, bconsole was 
> running as a superuser.)

It doesn't matter what user bconsole is running as; the file daemon is 
what matters.

Even if it runs as root, additional security enhancements beyond 
classic file system permissions could apply, preventing root from 
accessing files. There's even a classic case: NFS mounts can map the 
root user to a user without any permissions.

As you're running ubuntu, and ubuntu as far as I know doesn't use 
SElinux or AppArmor by default, I suspect it's either a NFS-related 
problem or your FD doesn't run as root.

> My next step should be to repeat the test under the original conditions, 
> where it failed, to see if it fails again. To reproduce the original 
> conditions I need to run the scripts drop_bacula_tables and 
> make_bacula_tables described in the documentation (section 9.5). But on 
> my system they apparently do not exist. I searched the whole file system 
> for them and found nothing.
> 
> I tried repeating the original test anyway. It said it succeeded, but it 
> didn't write anything -- I think because it was supposed to be creating 
> an incremental backup and nothing had changed, although I had deleted 
> the original full backup in the meantime.

How did you delete it? By using bconsole commands delete or purge, or 
by simply removing the backup volume?

>  I wish this test had been 
> more conclusive, but it is not my most immediate concern.
> 
> At this point I need to ask four groups of questions.
> 
> FIRST: what should I make of the "Permission denied" message? Is it 
> cause for concern, and if it is, what can I do about it?

It is as long as you don't know what causes it.

Check the permissions of the file in question.

Check which user the FD runs as. Check for security enhancements, 
starting with ACLs, and checking for SELinux and AppArmor.

> SECOND: what should I make of the fact that the test which previously 
> failed now succeeds, for an unknown reason? This makes me feel very 
> insecure, since the failure could happen again at any time, and if it 
> does I still won't know why.

This issue should be resolved. As long as you see backups not working 
and don't know the reasons the whole backup process is, in my opinion, 
nearly worthless.

> 
> THIRD: the missing scripts, and some of the earlier problems I had, make 
> me suspect that my Bacula distribution (installed from one of the 
> official Ubuntu repositories) is incomplete.

That seems to be the case. I'm not a ubuntu user, but I read similar 
reports on the mailing lists.

> I wonder what to do about 
> that. Perhaps I should rebuild Bacula from the source distribution, but 
> I am very hesitant about that. I am new to Linux, and have never built a 
> Linux application, and do not know what is involved.

Bacula is not that hard to build... in fact, to get the database 
scripts, you need only a very limited sort of success in building Bacula.

> Maybe it would be 
> easy. Maybe it would create problems much bigger than the ones I am 
> wrestling with now.

You'll have to try - depending on what you already installed on your 
system, and your understanding of the required software (compilers, 
make, auxiliary tools, development packages having the necessary .h 
files, package dependencies, ...) this can be simple or prove to be a 
time-consuming process.


> FOURTH: I wonder whether I should be doing this at all. My goal is not 
> to master Bacula;

That's reasonable.

> it is to do software development in Linux. 

Then the idea to compile and install Bacula from source should not be 
a concern. You'll have to learn the stuff anyway.

> Establishing a backup and restore capability is just one part of that 
> task, and it is taking far more time and work than I expected. And I 
> know that when I solve the problems now before me, I will not be done; I 
> will still have to make Bacula work with tape, master the skills of 
> creating and restoring full, incremental, and differential backups 
> reliably, and learn how to create and restore a disaster recovery 
> backup.  Any of those steps could raise problems comparable to the ones 
> I have already faced, and only partly solved.
> 
> Maybe Bacula is telling me that it is not right for me; I should choose 
> some other, simpler backup program.

If there is one... my experience is that backup in general is not a 
simple task. A software vendor that claims to have a backup software 
that does not require a certain effort and some understanding by its 
admin is lying. While there are programs that are simpler to use than 
Bacula, none of them is, in my opinion, close to being a full backup 
solution. (cp, tar, cpio, rsync to just name a few.)

Full backup solutions are about as complex as Bacula.

> Or maybe I shouldn't be trying to 
> use Linux without having an expert on call. What would you advise?

That might be a good thing, at least if you decide you need a well 
maintained system for your work and also clearly see that you are not 
(yet) capable of doing it yourself. Asking that question alone is, in 
my opinion, proof that you know quite well what you want, and see your 
limits. A very good start on the road to a fine end result, 
independent of the decision to learn things yourself or outsource them...

Ok, that was the general answer :-)

What you should do now is to
- decide if you will do this yourself, or let someone else do the 
dirty work for you.
- If you look for help don't hesitate to ask here, on this list. 
Typically, no-one has any problems with this.
- If you go on yourself, decide if you'll install Bacula from source, 
or only need the database scripts. In the latter case, you can easily 
create them from the source without losing all your existing Bacula 
installation.
- If you decide to compile yourself, start by removing the installed, 
packaged version - you really don't want two different sets of 
programs installed at the same time, in different locations.

In any case, you should end up with an environment that allows you to 
cleanly run and re-run the tests. Once you're there, we will gladly 
help you interpreting your results.

Arno


-- 
Arno Lehmann
IT-Service Lehmann
Sandstr. 6, 49080 Osnabrück
www.its-lehmann.de

-------------------------------------------------------------------------
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