Hello,
On 3/27/2006 9:55 AM, Gavin Conway wrote:
Hi All,
I'm aware that others have the same problem and that they have
apparently solved it but I'm still at my wits end. I'm trying to run a 2
week tape rotation with a monday-friday full system backup along with a
catalog backup to tape. Each time it runs I get the following output;
25-Mar 12:55 server3-dir: RunAfter: +
/etc/bacula/scripts/delete_catalog_backup
25-Mar 12:55 server3-dir: RunAfter: + /usr/bin/bconsole -c
/etc/bacula/bconsole.conf
25-Mar 12:55 server3-dir: RunAfter: Connecting to Director server3:9101
25-Mar 12:55 server3-dir: RunAfter: 1000 OK: server3-dir Version: 1.36.2
(28 February 2005)
25-Mar 12:55 server3-dir: RunAfter: Enter a period to cancel a command.
25-Mar 12:55 server3-dir: RunAfter: unmount storage=DAT-72
25-Mar 12:55 server3-dir: RunAfter: Using default Catalog name=MyCatalog
DB=bacula
25-Mar 12:55 server3-dir: RunAfter: 3901 Device "/dev/nst0" is already
unmounted.
25-Mar 12:55 server3-dir: RunAfter: You have messages.
25-Mar 12:55 server3-dir: RunAfter: + /bin/mt -f /dev/nst0 rewind
25-Mar 12:55 server3-dir: RunAfter: /dev/nst0: Permission denied
25-Mar 12:55 server3-dir: RunAfter: + /bin/mt -f /dev/nst0 offline
25-Mar 12:55 server3-dir: RunAfter: /dev/nst0: Permission denied
25-Mar 12:55 server3-dir: RunAfter: + /bin/mt -f /dev/nst0 eject
25-Mar 12:55 server3-dir: RunAfter: /dev/nst0: Permission denied
25-Mar 12:55 server3-dir: RunAfter: + exit 0
Here's the eject script;
#!/bin/bash -x
/etc/bacula/scripts/delete_catalog_backup
/usr/bin/bconsole -c /etc/bacula/bconsole.conf <<END_OF_DATA
unmount storage=DAT-72
END_OF_DATA
/bin/mt -f /dev/nst0 rewind
/bin/mt -f /dev/nst0 offline
/bin/mt -f /dev/nst0 eject
exit 0
Here's the storage daemon;
Device {
Name = DAT-72
Media Type = DAT-72
Archive Device = /dev/nst0
AutomaticMount = yes; # when device opened, read it
LabelMedia = yes;
AlwaysOpen = no;
RemovableMedia = yes;
RandomAccess = no;
SpoolDirectory = /tmp/;
Maximum Spool Size = 10737418240; #10gb in bytes
}
I've been reading the threads on here and trying things out (hence the
end_of_backup.sh script above) but no luck. I get the same output each
time. If I use the 'offline on unmount' command then I'm unable to run
the 2 backup jobs to each tape.
Any suggestions or recommendations at this point would be greatly
appreciated.
If all you want to do is to unmount and eject the tape once a week
there's no need to have the corresponding commands executed each day.
You could set up an admin job or use cron to submit the necessary
commands only when necessary.
Furthermore, make sure the user the script runs as (usually the user the
DIR runs as) has the necessary permissions to access the tape drive.
This has been discussed quite extensively recently, so you should be
able to find detailed advice in the list archives.
Arno
--
IT-Service Lehmann [EMAIL PROTECTED]
Arno Lehmann http://www.its-lehmann.de
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users