Thank you for answering.
Richard Mortimer wrote:
I'm using 2.0.3-4 on etch (I recompiled the lenny sources for etch on
Sparc) and it works fine for DVDs.
I've made a couple of suggestions inline in the message but I documented
the procedure that I went though when finding the bugs in DVD writing.
You may find the instructions at
http://bridge.oldelvet.org.uk/bacula/BaculaDVDSetup.html
useful.
I already saw that and tested what was suggested. Very useful page
which should be mentioned in the manual. The DVD-access tests using
DVD-handler are successful but my problem is still there :-(.
On Tue, 2007-07-17 at 14:56 +0200, Olivier wrote:
Hello list,
I have spent much time trying to set up DVD-writing with Bacula, and
almost made it work... But I come to you for (hopefully) the last step
which I can't get working.
When running a backup job supposed to write on DVD, bacula-sd wait for
me to mount a volume: "Please mount Volume "BaculaDVD0001" on Storage
Device "DVD-Writer" (/dev/hdd) for Job
Full_Set_on_DVD.2007-07-16_14.51.42", it says. How should I do that? The
"mount" command from the console does not stop bacula for asking this.
Mounting the DVD from command-line is impossible as the DVD is blank
(has no FS). Shouldn't the mount happen automatically, as I asked for
automatic labelling?
You have to issue a mount command in bconsole to initiate the mount. If
there is blank media in there then it will autolabel.
I forgot to mention: I also have automount=yes. That's why I thought
the device should be auto-mounted.
I'd like to add that after asking in bconsole to mount the DVD drive, a
status command reports:
Device status:
Device "FileStorage" (/tmp) is not open.
Device "DVD-Writer" (/dev/hdd) is not open.
Device is BLOCKED waiting for media.
====
In Use Volume status:
BaculaDVD0004 on device "DVD-Writer" (/dev/hdd)
Thus apparently the volume is indeed mounted on the device, from the
volume point of view, but the drive is still waiting for media. Which
media is it waiting for, then? Should I issue a command to somehow
"open" the device?
You could try issuing a label command using BaculaDVD0001 as the volume
name.
I'm not sure I understand your suggestion. Won't Bacula be confused if
I ask him to "label" with an already-given label? The autolabelling
seems to work as Bacula says that the label succeeded (Bacula says:
"20-jui 12:24 Olivier-dir: Created new Volume "BaculaDVD0004" in
catalog.")...
I tried to run a job, then when Bacula asks me to mount the volume on
the device (after having labelled it automatically), I label again. Is
that what you suggest? Here is the result.
20-jui 12:26 Olivier-sd: Please mount Volume "BaculaDVD0004" on Storage
Device "DVD-Writer" (/dev/hdd) for Job
Full_Set_on_DVD.2007-07-20_12.24.31
*label
The defined Storage resources are:
1: File
2: DVD-director-stor
Select Storage resource (1-2): 2
Enter new Volume name: BaculaDVD0004
Defined Pools:
1: Default
2: DVDPool
Select the Pool (1-2): 2
Connecting to Storage daemon DVD-director-stor at smg8.ulb.ac.be:9103
...
Sending label command for Volume "BaculaDVD0004" Slot 0 ...
3910 Unable to open device "DVD-Writer" (/dev/hdd): ERR=dev.c:651 Could
not open: /tmp/backup/BaculaDVD0004, ERR=No such file or directory
Label command failed for Volume BaculaDVD0004.
Do not forget to mount the drive!!!
I just tried to run the job after disabling autolabel and automount in
the SD config file (and restarting daemons, and cancelling jobs, and
disabling all volumes in DVD pool) :
Job queued. JobId=47
*
20-jui 12:43 Olivier-dir: Start Backup JobId 47,
Job=Full_Set_on_DVD.2007-07-20_12.43.06
20-jui 12:43 Olivier-dir: Created new Volume "BaculaDVD0005" in catalog.
20-jui 12:43 Olivier-sd: Full_Set_on_DVD.2007-07-20_12.43.06 Warning:
Device "DVD-Writer" (/dev/hdd) not configured to autolabel Volumes.
20-jui 12:43 Olivier-sd: Full_Set_on_DVD.2007-07-20_12.43.06 Warning:
Device "DVD-Writer" (/dev/hdd) not configured to autolabel Volumes.
20-jui 12:43 Olivier-sd: Please mount Volume "BaculaDVD0005" on Storage
Device "DVD-Writer" (/dev/hdd) for Job
Full_Set_on_DVD.2007-07-20_12.43.06
*label
The defined Storage resources are:
1: File
2: DVD-director-stor
Select Storage resource (1-2): 2
Enter new Volume name: BaculaDVD0005
Defined Pools:
1: Default
2: DVDPool
Select the Pool (1-2): 2
Connecting to Storage daemon DVD-director-stor at smg8.ulb.ac.be:9103
...
Sending label command for Volume "BaculaDVD0005" Slot 0 ...
3910 Unable to open device "DVD-Writer" (/dev/hdd): ERR=dev.c:651 Could
not open: /tmp/backup/BaculaDVD0005, ERR=No such file or directory
Label command failed for Volume BaculaDVD0005.
Do not forget to mount the drive!!!
Indeed:
Olivier:~# ls -a /tmp/backup/
. ..
So my problem seems to be with the "labelling" process. Why should
there be a "BaculaDVD0005" file in /tmp/backup/ when I ask Bacula to
label my DVD?
Here below, the config and testing procedure details.
Thanks a lot for any hint. I am stuck there since a very long time and
already tried everything I could find in the mailing lists archive
regarding this problem.
Olivier
==Config==
Bacula 2.0.3, installed using apt-get from Debian distribution "testing"
AKA "lenny". Also tried with Bacula 1.38.11 (from "stable"), same
behavior encountered (a bit worse, in fact, I can add details if
somebody is interrested).
Olivier:/etc/bacula# bacula-console
Connecting to Director (address hidden):9101
1000 OK: Olivier-dir Version: 2.0.3 (06 March 2007)
Olivier:/etc/bacula# growisofs --version
* growisofs by <[EMAIL PROTECTED]>, version 7.0.1,
front-ending to mkisofs: mkisofs 2.01.01a03-unofficial-iconv
(i686-pc-linux-gnu)
Debian etch certainly has the correct patches for bacula DVD
[most probably patched version, as it is the debian one]
Olivier:/etc/bacula# uname -a
Linux Olivier 2.6.15.6 #1 SMP Tue Mar 14 15:17:05 CET 2006 i686 GNU/Linux
no automount (as far as I know)
The three daemons run on the same computer, started from a root ("su")
shell.
To be absolutely sure do
su -
to get a totally clean environment.
Right. That's what I meant.
Config files (see after for the tests I made):
cat bacula-dir.conf | grep -v ^# | grep -v Password
Director { # define myself
Name = Olivier-dir
DIRport = 9101 # where we listen for UA connections
QueryFile = "/etc/bacula/scripts/query.sql"
WorkingDirectory = "/var/lib/bacula"
PidDirectory = "/var/run/bacula"
Maximum Concurrent Jobs = 1
Messages = Daemon
DirAddress = (hidden)
}
JobDefs {
Name = "DefaultJob"
Type = Backup
Level = Incremental
Client = Olivier-fd
FileSet = "Full Set"
Schedule = "WeeklyCycle"
Storage = File
Messages = Standard
Pool = Default
Priority = 10
}
Job {
Name = "Client1"
JobDefs = "DefaultJob"
Write Bootstrap = "/var/lib/bacula/Client1.bsr"
}
Job {
Name = "Full Set on DVD"
Enabled = no # disables auto run by scheduler
Type = Backup
Level = Full
Client = Olivier-fd
FileSet = "Full Set"
Storage = "DVD-director-stor"
Messages = Standard
Pool = "DVDPool"
Priority = 10
Write Bootstrap = "/var/lib/bacula/bootstrap-MonJob.bsr"
}
Job {
Name = "BackupCatalog"
JobDefs = "DefaultJob"
Level = Full
FileSet="Catalog"
Schedule = "WeeklyCycleAfterBackup"
Write Part After Job = yes
# This creates an ASCII copy of the catalog
RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup -u<user>
-p<password>" # This deletes the copy of the catalog
RunAfterJob = "/etc/bacula/scripts/delete_catalog_backup"
Write Bootstrap = "/var/lib/bacula/BackupCatalog.bsr"
Priority = 11 # run after main backup
}
Job {
Name = "RestoreFiles"
Type = Restore
Client=Olivier-fd
FileSet="Full Set"
Storage = File
Pool = Default
Messages = Standard
Where = /tmp/bacula-restores
}
FileSet {
Name = "Full Set"
Include {
Options {
Compression=GZIP
signature = MD5
}
File = /usr/local/share/cruisecontrol
}
Exclude {
File = /proc
File = /tmp
File = /.journal
File = /.fsck
}
}
Schedule {
Name = "WeeklyCycle"
Run = Full 1st sun at 23:05
Run = Differential 2nd-5th sun at 23:05
Run = Incremental mon-sat at 23:05
}
Schedule {
Name = "WeeklyCycleAfterBackup"
Run = Full sun-sat at 23:10
}
FileSet {
Name = "Catalog"
Include {
Options {
signature = MD5
}
File = /var/lib/bacula/bacula.sql
}
}
Client {
Name = Olivier-fd
Address = (hidden)
FDPort = 9102
Catalog = MyCatalog
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}
Storage {
Name = File
Address = (hidden) # N.B. Use a fully qualified name here
SDPort = 9103
Device = FileStorage
Media Type = File
}
Storage {
Name = "DVD-director-stor"
Address = (hidden) # N.B. Use a fully qualified name here
SDPort = 9103
Device = "DVD-Writer"
MediaType = DVD
I presume that you have a Password = "zzz" in the real config.
Yes I do.
}
Catalog {
Name = MyCatalog
dbname = bacula; password = "@db_pswd@"
}
Messages {
Name = Standard
mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\"
-s \"Bacula: %t %e of %c %l\" %r"
operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\)
%r\" -s \"Bacula: Intervention needed for %j\" %r"
mail = [EMAIL PROTECTED] = all, !skipped
operator = [EMAIL PROTECTED] = mount
console = all, !skipped, !saved
append = "/var/lib/bacula/log" = all, !skipped
}
Messages {
Name = Daemon
mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\"
-s \"Bacula daemon message\" %r"
mail = [EMAIL PROTECTED] = all, !skipped
console = all, !skipped, !saved
append = "/var/lib/bacula/log" = all, !skipped
}
Pool {
Name = Default
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle
Volumes AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
Accept Any Volume = yes # write on any volume in the pool
}
Pool {
Name = DVDPool
LabelFormat = "BaculaDVD"
Pool Type = Backup
Recycle = no # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
}
Console {
Name = Olivier-mon
CommandACL = status, .status
}
cat bacula-sd.conf | grep -v ^# | grep -v Password
Storage { # definition of myself
Name = Olivier-sd
SDPort = 9103 # Director's port
WorkingDirectory = "/var/lib/bacula"
Pid Directory = "/var/run/bacula"
Maximum Concurrent Jobs = 20
SDAddress = (hidden)
}
Director {
Name = Olivier-dir
}
Director {
Name = Olivier-mon
Monitor = yes
}
Device {
Name = FileStorage
Media Type = File
Archive Device = /tmp
LabelMedia = yes; # lets Bacula label unlabeled media
Random Access = Yes;
AutomaticMount = yes; #255652/888/32..3..2332 # when
device opened, read it
RemovableMedia = no;
AlwaysOpen = no;
}
Device {
Name = "DVD-Writer"
Media Type = DVD
Archive Device = /dev/hdd
LabelMedia = yes; # lets Bacula label unlabeled media
Random Access = Yes;
AutomaticMount = yes; # when device opened, read it
RemovableMedia = yes;
AlwaysOpen = no;
MaximumPartSize = 800M;
RequiresMount = yes;
MountPoint = /mnt/dvd;
MountCommand = "/bin/mount -t iso9660 -o ro %a %m";
UnmountCommand = "/bin/umount %m";
SpoolDirectory = /tmp/backup;
WritePartCommand = "/etc/bacula/scripts/dvd-handler %a write %e %v"
FreeSpaceCommand = "/etc/bacula/scripts/dvd-handler %a free"
}
Does /mnt/dvd exist?
Does /tmp/backup exist?
Yes, and mounting /dev/hdd to /mnt/dvd on the linux command line works
(when the dvd is not blank naturally).
Messages {
Name = Standard
director = Olivier-dir = all
}
cat bacula-fd.conf | grep -v ^# | grep -v Password
Director {
Name = Olivier-dir
}
Director {
Name = Olivier-mon
Monitor = yes
}
FileDaemon { # this is me
Name = Olivier-fd
FDport = 9102 # where we listen for the director
WorkingDirectory = /var/lib/bacula
Pid Directory = /var/run/bacula
Maximum Concurrent Jobs = 20
FDAddress = (hidden)
}
Messages {
Name = Standard
director = Olivier-dir = all, !skipped, !restored
}
== Test procedure ==
Using a DVD+RW disk. I blank the drive, then check that it can't be mounted.
dd if=/dev/zero bs=1024 count=512 | growisofs -Z /dev/hdd=/dev/fd/0
Olivier:/etc/bacula# mount /dev/hdd /mnt/dvd
mount: you must specify the filesystem type
In the bacula console, after having restarted the three daemons, I check
that no jobs are running and I use "update" to disable the current
volume's status, if any (to start everything from scratch). Then I run
the DVD-backup job:
*run
A job name must be specified.
The defined Job resources are:
1: Client1
2: Full Set on DVD
3: BackupCatalog
4: RestoreFiles
Select Job resource (1-4): 2
Run Backup job
JobName: Full Set on DVD
Level: Full
Client: Olivier-fd
FileSet: Full Set
Pool: DVDPool (From Job resource)
Storage: DVD-director-stor (From Job resource)
When: 2007-07-17 14:43:26
Priority: 10
OK to run? (yes/mod/no): yes
Job queued. JobId=39
*messages
17-jui 14:43 Olivier-dir: Start Backup JobId 39,
Job=Full_Set_on_DVD.2007-07-17_14.43.30
17-jui 14:43 Olivier-dir: Created new Volume "BaculaDVD0003" in catalog.
17-jui 14:43 Olivier-sd: Please mount Volume "BaculaDVD0003" on Storage
Device "DVD-Writer" (/dev/hdd) for Job Full_Set_on_DVD.2007-07-17_14.43.30
*mount
The defined Storage resources are:
1: File
2: DVD-director-stor
Select Storage resource (1-2): 2
3001 OK mount. Device="DVD-Writer" (/dev/hdd)
*messages
17-jui 14:45 Olivier-sd: Please mount Volume "BaculaDVD0003" on Storage
Device "DVD-Writer" (/dev/hdd) for Job Full_Set_on_DVD.2007-07-17_14.43.30
*status
Status available for:
1: Director
2: Storage
3: Client
4: All
Select daemon type for status (1-4): 2
The defined Storage resources are:
1: File
2: DVD-director-stor
Select Storage resource (1-2): 2
Connecting to Storage daemon DVD-director-stor at (hidden):9103
Olivier-sd Version: 2.0.3 (06 March 2007) i486-pc-linux-gnu debian 4.0
Daemon started 17-jui-07 14:42, 0 Jobs run since started.
Heap: bytes=156,816 max_bytes=222,620 bufs=118 max_bufs=123
Running Jobs:
Writing: Full Backup job Full_Set_on_DVD JobId=39 Volume="BaculaDVD0003"
pool="DVDPool" device=""DVD-Writer" (/dev/hdd)"
spooling=0 despooling=0 despool_wait=0
Files=0 Bytes=0 Bytes/sec=0
FDReadSeqNo=6 in_msg=6 out_msg=4 fd=5
====
Jobs waiting to reserve a drive:
====
Terminated Jobs:
JobId Level Files Bytes Status Finished Name
===================================================================
6 0 0 OK 13-jui-07 14:19 RestoreFiles
15 Incr 112 325.5 K OK 13-jui-07 19:17 Client1
25 Full 0 0 Error 16-jui-07 11:07 Full_Set_on_DVD
27 Full 0 0 Cancel 16-jui-07 11:23 Full_Set_on_DVD
28 Full 0 0 Cancel 16-jui-07 11:29 Full_Set_on_DVD
33 Full 0 0 Cancel 16-jui-07 16:13 Full_Set_on_DVD
34 Full 0 0 Cancel 16-jui-07 16:15 Full_Set_on_DVD
35 Full 0 0 Cancel 17-jui-07 14:23 Full_Set_on_DVD
36 Incr 0 0 Cancel 17-jui-07 14:23 Client1
38 Full 0 0 Cancel 17-jui-07 14:40 Full_Set_on_DVD
====
Device status:
Device "FileStorage" (/tmp) is not open.
Device "DVD-Writer" (/dev/hdd) is not open.
Device is BLOCKED waiting for media.
====
In Use Volume status:
BaculaDVD0003 on device "DVD-Writer" (/dev/hdd)
====
== What works ==
(NB: /dev/cdrw is the same as /dev/dvd)
Writing to DVD using growisofs works:
growisofs -Z /dev/cdrw -R -J /etc => OK (mount then ls shows the /etc
directory contents)
Creating a "file1" random file, then writing it to DVD using dvd-handler
script works:
ls -l /tmp/file1
-rw-r--r-- 1 root root 82360320 2007-07-16 14:08 /tmp/file1
unmount DVD, blank it, then
/etc/bacula/scripts/dvd-handler /dev/cdrw write 1 /tmp/file1 => OK
(mount then ls and md5sum to check "file1" contents OK)
Doing a simple "file" backup with bacula console works. The backup is
indeed created in /tmp.
Thanks again for any help.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users
|