On Wed, 2005-10-19 at 11:17 +0100, Martin Simmons wrote: 
> >>>>> On Wed, 19 Oct 2005 12:08:24 +1000, Craig Holyoak <[EMAIL PROTECTED]> 
> >>>>> said:
> 
>   Craig> I'm running bacula 1.36.2 on Debian stable. Whenever I try to run a 
> restore
>   Craig> job, it fails with:
> 
>   Craig>   19-Oct 11:29 helmsdeep: Start Restore Job 
> Restore.2005-10-19_11.29.50
>   Craig>   19-Oct 11:29 newman: Restore.2005-10-19_11.29.50 Fatal error: 
> Could not create bootstrap file 
> /var/lib/bacula/newman.Restore.2005-10-19_11.29.50.bootstrap: ERR=Permission 
> denied
>   Craig>   19-Oct 11:29 newman: Restore.2005-10-19_11.29.50 Fatal error: 
> job.c:1662 Comm error with SD. bad response to Bootstrap. ERR=Connection 
> reset by peer
>   Craig>   19-Oct 11:29 helmsdeep: Restore.2005-10-19_11.29.50 Error: Bacula 
> 1.36.2 (28Feb05): 19-Oct-2005 11:29:53
>   Craig>     JobId:                  878
>   Craig>     Job:                    Restore.2005-10-19_11.29.50
>   Craig>     Client:                 newman
>   Craig>     Start time:             19-Oct-2005 11:29:52
>   Craig>     End time:               19-Oct-2005 11:29:53
>   Craig>     Files Expected:         1
>   Craig>     Files Restored:         0
>   Craig>     Bytes Restored:         0
>   Craig>     Rate:                   0.0 KB/s
>   Craig>     FD Errors:              0
>   Craig>     FD termination status:  Error
>   Craig>     SD termination status:  Error
>   Craig>     Termination:            *** Restore Error ***
> 
>   Craig> This machine runs all bacula daemons. The director and sd run as the 
> bacula
>   Craig> user, and the sd runs as root. /var/lib/bacula is writable by the 
> bacula user
>   Craig> (and root, obviously :-).
> 
>   Craig> I've tried modifying the job and redirecting the bootstrap file 
> elsewhere (eg
>   Craig> /tmp), but I keep getting the same errors. I have never run a 
> successful
>   Craig> restore using bconsole. I'm forced to use bextract to do all my 
> restores,
>   Craig> which works fine.
> 
>   Craig> Any ideas?
> 
> The error comes from the SD.
> 
> So "helmsdeep" and "newman" are the same machine?

"helmsdeep" is the name of my bacula director, which runs on "newman",
so yes, these are the same machine.

> Does "getting the same errors" mean that it always says "/var/lib/bacula" even
> when the bootstrap should be in /tmp?

Perhaps I'm a little unclear on what bootstraps are involved. By
default, a bootstrap for the job is placed
in /var/lib/bacula/restore.bsr. If I change this elsewhere by modifying
the job before it is run, ie, /tmp/restore.bsr, it fails because it
can't find the file - there is no /tmp/restore.bsr. But even though it
creates the bootstrap successfully to /var/lib/bacula/restore.bsr, it
still wants to
create /var/lib/bacula/newman.Restore.2005-10-19_11.29.50.bootstrap, at
which point if fails with permission denied.

> What is the output of
> 
> ls -la /var/lib/bacula
> ls -la /var/lib
> ls -la /var
> 
> on the SD? 

[newman:~]# ls -la /var/lib/bacula
total 528848
drwxrwxr-x   2 bacula backups      4096 2005-10-20 07:21 .
drwxr-xr-x  36 root   root         4096 2005-09-17 14:03 ..
-rw-r-----   1 bacula backups       516 2005-10-20 01:18
BackupCatalog.bsr
-rw-r-----   1 bacula backups 539603968 2005-06-28 09:52 bacula.db.old
-rw-r-----   1 bacula backups      2032 2005-10-19 11:28
bacula-dir.9101.state
-rw-r-----   1 root   root         2032 2005-10-19 11:28
bacula-fd.9102.state
-rw-r-----   1 bacula tape         2032 2005-10-19 11:28
bacula-sd.9103.state
-rw-r-----   1 bacula backups       103 2004-11-28 12:39 CVS.bsr
-rw-r-----   1 bacula backups      2779 2004-09-19 16:13 Data.bsr
-rw-------   1 bacula backups         0 2005-10-19 11:31
helmsdeep.conmsg
-rw-------   1 bacula backups         0 2004-09-17 17:45
helmsdeep-dir.conmsg
-rw-r-----   1 bacula backups      1303 2005-10-20 01:11 Home.bsr
-rwxrwx---   1 bacula backups   1319129 2005-10-20 01:18 log
-rw-r-----   1 bacula backups       523 2005-10-20 01:12 Mail.bsr
-rw-r-----   1 bacula backups       430 2004-11-28 12:55 Music.bsr
-rw-------   1 bacula backups         0 2004-09-16 08:27
newman-dir.conmsg
-rw-r-----   1 bacula backups       633 2005-10-20 01:05 NewmanRoot.bsr
-rw-r-----   1 bacula backups       745 2005-10-20 01:07 PenfoldRoot.bsr
-rw-r-----   1 bacula backups       107 2005-10-16 03:00 Public.bsr
-rw-r-----   1 bacula backups       107 2005-10-19 11:29 restore.bsr
-rw-r-----   1 root   root           73 2005-07-08 10:11 root-exclude
-rw-r-----   1 root   root            2 2004-11-15 09:20 root-include
-rw-r-----   1 bacula backups       104 2005-10-16 03:00 Source.bsr
[newman:~]# ls -la /var/lib
total 144
drwxr-xr-x  36 root   root    4096 2005-09-17 14:03 .
drwxr-xr-x  14 root   root    4096 2005-07-12 16:57 ..
drwxr-xr-x   2 root   root    4096 2005-05-12 15:35 apache2
drwxr-xr-x   3 root   root    4096 2005-07-18 13:21 apt
drwxr-xr-x   2 root   root    4096 2004-07-31 17:51 aptitude
drwxr-xr-x   2 root   root    4096 2005-03-04 02:21 apt-proxy
drwxrwxr-x   2 bacula backups 4096 2005-10-20 07:21 bacula
drwxr-xr-x   2 clamav clamav  4096 2005-10-20 06:25 clamav
drwxr-x---   2 cyrus  mail    4096 2004-10-01 08:30 cyrus
drwxr-xr-x   2 root   root    4096 2005-07-18 13:21 deborphan
drwxr-xr-x   2 root   root    4096 2004-07-31 17:52 dhcp
drwxr-xr-x   2 root   root    4096 2005-09-30 09:09 dhcp3
drwxr-xr-x   2 root   root    4096 2005-09-24 10:20 discover
drwxr-xr-x   7 root   root    4096 2005-10-10 09:03 dpkg
drwxr-xr-x   2 root   root    4096 2005-05-07 16:28 dyndnsupdate
drwxr-xr-x   2 root   root    4096 2005-09-29 17:37 exim4
drwx------   2 root   root    4096 2004-10-07 18:07 krb5kdc
drwxr-xr-x   2 root   root    4096 2005-10-15 07:10 ldap
drwxr-xr-x   2 root   root    4096 2004-08-06 06:25 logrotate
drwxr-xr-x   2 root   root    4096 2004-04-27 03:45 misc
drwxr-xr-x   2 root   root    4096 2005-07-12 17:00 mrtg
drwxr-xr-x   5 mysql  mysql   4096 2005-10-01 10:37 mysql
drwxr-xr-x   4 root   root    4096 2005-10-03 10:54 nfs
drwxr-xr-x   2 root   root    4096 2005-10-20 06:54 ntp
drwxrwx---   2 root   nut     4096 2005-04-20 00:14 nut
drwxr-xr-x   2 root   root    4096 2004-10-08 21:45 quota
drwxr-xr-x   3 root   root    4096 2004-08-02 17:28 samba
drwxr-xr-x   2 root   root    4096 2004-07-31 17:52 setserial
drwxr-xr-x   2 root   root    4096 2005-09-13 11:44 sgml-base
drwxr-x---   2 root   root    4096 2005-10-18 06:22 shorewall
drwxr-xr-x   2 root   root    4096 2004-08-02 08:46 slapd
drwxr-xr-x   2 root   root    4096 2005-09-24 10:25 snmp
drwxr-xr-x   2 root   root    4096 2004-08-11 01:37 sysvconfig
drwxr-xr-x   3 root   root    4096 2005-09-19 07:58 ucf
drwxr-xr-x   2 root   root    4096 2005-09-24 10:24 urandom
drwxr-xr-x   2 root   root    4096 2005-09-13 11:44 xml-core
[newman:~]# ls -la /var
total 56
drwxr-xr-x  14 root root  4096 2005-07-12 16:57 .
drwxr-xr-x  26 root root  4096 2005-02-25 05:59 ..
drwxr-xr-x   5 root root  4096 2005-10-20 04:03 backups
drwxr-xr-x  11 root root  4096 2005-09-27 08:52 cache
drwxr-xr-x  36 root root  4096 2005-09-17 14:03 lib
drwxrwsr-x   2 root admin 4096 2004-04-27 03:45 local
drwxrwxrwt   6 root root  4096 2005-09-24 10:24 lock
drwxr-xr-x  16 root root  4096 2005-10-20 04:04 log
drwxrwsr-x   2 root mail  4096 2005-03-05 19:12 mail
drwxr-xr-x   2 root root  4096 2004-07-31 17:50 opt
drwxr-xr-x  18 root root  4096 2005-10-18 13:17 run
drwxr-xr-x  10 root root  4096 2005-09-19 13:21 spool
drwxrwxrwt   3 root root  4096 2005-10-16 08:09 tmp
drwxr-xr-x   6 root root  4096 2005-08-18 17:56 www

> Does
> 
> touch /var/lib/bacula/touch-test
> 
> work as the bacula user on the SD?

Yes:

[EMAIL PROTECTED]:~$ touch /var/lib/bacula/touch-test
[EMAIL PROTECTED]:~$ ls -l /var/lib/bacula/touch-test
-rw-------  1 bacula backups 0 Oct 20 07:28 /var/lib/bacula/touch-test

I hope this helps clarify the situation. Thanks for your help,

Craig

-- 
Craig Holyoak
[EMAIL PROTECTED]
http://www.helmsdeep.org/

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to