Thanks for your reply Arno...
*If* it is a bug, it has crept in between 1.36.2 and 1.38.9 releases. I just
confirmed that the restore goes fine (ie. both tests work as expected) on a
1.36.2 install. Taking the exact same config files (provided), a 1.38.9
release
fails with the same message provided in my first email.
Cheers,
Ben
=============================================
#
# Default Bacula Director Configuration file
#
# The only thing that MUST be changed is to add one or more
# file or directory names in the Include directive of the
# FileSet resource.
#
# For Bacula release 1.36.1 (24 November 2004) -- mandrake for
#
# You might also want to change the default email address
# from root to your address. See the "mail" and "operator"
# directives in the Messages resource.
#
# DO NOT REMOVE - Email on edit
Director { # define myself
Name = "Djheath-dir"
DIRport = 9101 # where we listen for UA connections
QueryFile = "/etc/bacula/query.sql"
WorkingDirectory = "/var/bacula"
PidDirectory = "/var/run"
Maximum Concurrent Jobs = 1
Password = "aaaaaa"
Messages = Daemon
FDConnectTimeout = 10sec
SDConnectTimeout = 5min
}
JobDefs {
Name = "DefaultJob"
Type = Backup
Level = Incremental
Client = "Djheath-fd"
FileSet = "Home"
Schedule = "WeeklyCycle"
Storage = File
Messages = Standard
Pool = "Default"
Priority = 10
}
#
# Define the main nightly save backup job
# By default, this job will back up to disk in /tmp
Job {
Name = "BackupHome"
Type = "Backup"
Level = "Full"
Client = "Djheath-fd"
FileSet = "Home"
Storage = "File"
Pool = "Default"
Priority = "10"
Messages = Standard
WriteBootstrap = "/var/bacula/Server-fd.bsr"
}
# Backup the catalog database (after the nightly save)
# Standard Restore template, to be changed by Console program
FileSet {
Name = "Catalog"
# DO NOT REMOVE - This is a database fileset
# DO NOT REMOVE - Webconfig NO_DELETE
# DO NOT REMOVE - Webconfig NO_EDIT
Include {
Options {
Signature = MD5
}
File = "/var/bacula/Catalog.sql"
}
}
# List of files to be backed up
FileSet {
# DO NOT REMOVE - Webconfig NO_DELETE
Name = "Home"
Include {
Options {
signature = MD5
}
#
# Put your list of files here, preceded by 'File =', one per line
# or include an external list with:
#
# File = <file-name
#
# Note: / backs up everything on the root partition.
# if you have other partitons such as /usr or /home
# you will probably want to add them too.
#
# By default this is defined to point to the Bacula build
# directory to give a reasonable FileSet to backup to
# disk storage during initial testing.
#
File = "/home"
}
#
# If you backup the root directory, the following two excluded
# files can be useful
#
Exclude {
File = "/proc"
File = "/tmp"
File = "/.autofsck"
}
}
#
# When to do the backups, full backup on first sunday of the month,
# differential (i.e. incremental since full) every other sunday,
# and incremental backups other days
Schedule {
# DO NOT REMOVE - Webconfig NO_DELETE
Name = "WeeklyCycle"
Run = Full 1st sun at 01:05
Run = Differential 2nd-5th sun at 01:05
}
# This schedule does the catalog.
Schedule {
# DO NOT REMOVE - Webconfig NO_DELETE
Name = "DailyCycle"
Run = Full daily at 1:10
}
# This is the backup of the catalog
# Client (File Services) to backup
Client {
Name = "Djheath-fd"
# DO NOT REMOVE - Webconfig NO_DELETE
Address = "localhost"
FDPort = 9102
Catalog = MyCatalog
Password = "xxxxxx"
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = "yes" # Prune expired Jobs/Files
FileRetention = 30 days
JobRetention = 6 months
}
# Definiton of file storage device
Storage {
# Do not use "localhost" here
# DO NOT REMOVE - Webconfig NO_DELETE
Name = File
Address = "192.168.2.185"
SDPort = 9103
Password = "yyyyyy"
Device = "File"
MediaType = "File"
}
# Generic catalog service
Catalog {
Name = MyCatalog
dbname = bacula
dbport = 3307
dbsocket = "/opt/bacula/var/lib/mysql/mysql.sock"
user = bacula
password = ""
}
# Reasonable message delivery -- send most everything to email address
# and to the console
Messages {
#
# NOTE! If you send to two email or more email addresses, you will need
# to replace the %r in the from field (-f part) with a single valid
# email address in both the mailcommand and the operatorcommand.
#
#
# WARNING! the following will create a file that you must cycle from
# time to time as it will grow indefinitely. However, it will
# also keep all your messages if they scroll off the console.
#
Name = Standard
mailcommand = "/usr/sbin/bsmtp -h mail.pointclark.net -f \"\(Bacula\) %r\"
-s
\"Bacula: %t %e of %c %l\" %r"
operatorcommand = "/usr/sbin/bsmtp -h mail.pointclark.net -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/log/bacula" = all, !skipped
}
#
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
mailcommand = "/usr/sbin/bsmtp -h mail.pointclark.net -f \"\(Bacula\) %r\"
-s
\"Bacula daemon message\" %r"
mail = "[EMAIL PROTECTED]" = all, !skipped
console = all, !skipped, !saved
append = "/var/log/bacula" = all, !skipped
}
# Default pool definition
#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
Name = Server-mon
Password = "monitor"
CommandACL = status, .status
}
Pool {
# DO NOT REMOVE - Webconfig NO_DELETE
Name = "Default"
PoolType = "Backup"
Recycle = "yes"
AutoPrune = "yes"
VolumeRetention = 3 days
AcceptAnyVolume = "yes"
LabelFormat = "DefaultVolume-"
}
Job {
# DO NOT REMOVE - Webconfig NO_DELETE
Name = "Restore"
Type = "Restore"
Client = "Djheath-fd"
FileSet = "Home"
Storage = "File"
Messages = "Standard"
Pool = "Default"
Replace = "always"
}
====================================================
#
# Default Bacula Storage Daemon Configuration file
#
# For Bacula release 1.36.1 (24 November 2004) -- redhat (Tettnang)
#
# You may need to change the name of your tape drive
# on the "Archive Device" directive in the Device
# resource. If you change the Name and/or the
# "Media Type" in the Device resource, please ensure
# that dird.conf has corresponding changes.
#
Storage { # definition of myself
Name = "Djheath-sd"
SDPort = 9103 # Director's port
WorkingDirectory = "/var/bacula"
Pid Directory = "/var/run"
MaximumConcurrentJobs = 20
}
Director {
Name = "Djheath-dir"
Password = "yyyyyy"
}
Device {
Name = File
MediaType = "File"
ArchiveDevice = "/tmp"
LabelMedia = "yes"
Random Access = "yes"
AutomaticMount = "yes"
RemovableMedia = "no"
AlwaysOpen = "yes"
RandomAccess = "yes"
}
Messages {
Name = Standard
director = "Djheath-dir" = all
}
====================================================
#
# Default Bacula File Daemon Configuration file
#
# For Bacula release 1.36.1 (24 November 2004) -- redhat (Tettnang)
#
# There is not much to change here except perhaps the
# File daemon Name to
#
#
# List Directors who are permitted to contact this File daemon
#
Director {
Name = "Djheath-dir"
Password = "xxxxxx"
}
FileDaemon { # this is me
Name = "Djheath-fd"
FDport = 9102 # where we listen for the director
WorkingDirectory = /var/bacula
Pid Directory = /var/run
Maximum Concurrent Jobs = 20
}
# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = "Djheath-dir" = all, !skipped
}
Benjamin Chambers, P.Eng.
ClarkConnect Account Manager
Point Clark Networks
1179 King Street West, Suite 211
Toronto, ON
Canada, M6K 3C5
Tel: +1.416.977.0574 Ext. 111
Fax: +1.416.946.1192
Email: [EMAIL PROTECTED]
Arno Lehmann wrote:
> Hi,
>
> On 12/7/2006 10:11 PM, Benjamin Chambers wrote:
>> Bacula version 1.38.9/1.38.11 with MySQL
>>
>> I would very much appreciate it if anyone could clarify an issue that has
>> come
>> up while attempting to restore from a bootstrap file.
>>
>> The question is actually fundamentally quite simple...Can a BSR file be used
>> to
>> perform a restore if you have the boostrap file and backup data...but have
>> lost
>> the Catalog? The situation being, of course, failure of the server itself,
>> where Bacula runs.
> ...
>> Here's a short summary of test results:
>>
>> TEST 1
>> ======
>> 1. Perform a backup of the server
>> 2. Perform a 'run job=Restore' using 'mod' to specify the BSR file created
>> automatically in step 1.
>>
>> Result: Restore OK (the catalog still existed)
>>
>> TEST 2
>> ======
>> 1. Perform a backup of the server
>> 2. Run /drop_mysql_database, create_mysql_database, make_mysql_tables
>> scripts
>> to simulate the loss of the server (Catalog).
>> 3. Perform a 'run job=Restore' using 'mod' to specify the BSR file created
>> automatically in step 1.
>>
>> Result: Restore FAILS
>
> That should work, according to the manual.
>
> I suggest you file a bug report at bugs.bacula.org, unless someone else
> has a better solution... I've never tried what you do, I always relied
> on bextrace for my destaster recovery test.
>
> Arno
>
>> I have provided some debug below. It looks as though the restore first
>> tries to
>> match the VolumeName picked up from the BSR against the Catalog.
>> Containing
>> no data (because the database was re-initialized between backup/restore),
>> this
>> operation, of course, fails. At this point, I'm not certain what
>> happens...if a
>> BSR restore with no Catalog is possible, one would think that the SD would
>> see
>> if it could find the Volume specified in the BSR. I *think* this is
>> happening,
>> but somewhere along the line, the VolumeName becomes nil.
>>
>> I know I can use bextract to do a successful restore in this case...but it's
>> not
>> as convenient and it would be good to clear up the capabilities anyways,
>> because
>> the section on "Disaster Recovery" doesn't (IMO) definitively say what I'm
>> trying to do is possible.
>>
>> Thanks in advance to anyone who has time and knowledge to shed some light.
>>
>> Cheers,
>>
>> Ben
>>
>> ******Job Report******
>> 07-Dec 15:58 Server-sd: Restore.2006-12-07_15.58.46 Warning: acquire.c:82
>> Error
>> getting Volume info: 1997 Volume "2006-12-07-0" not in catalog.
>> 07-Dec 15:58 Server-sd: Restore.2006-12-07_15.58.46 Fatal error:
>> acquire.c:109
>> Read open device "_BensLaptop" (/var/bacula/mnt/file/_BensLaptop) Volume ""
>> failed: ERR=Could not open file device "_BensLaptop"
>> (/var/bacula/mnt/file/_BensLaptop). No Volume name given.
>>
>> 07-Dec 15:58 Server-dir: Restore.2006-12-07_15.58.46 Error: Bacula 1.38.11
>> (28Jun06): 07-Dec-2006 15:58:50
>> JobId: 1
>> Job: Restore.2006-12-07_15.58.46
>> Client: Server-fd
>> Start time: 07-Dec-2006 15:58:49
>> End time: 07-Dec-2006 15:58:50
>> Files Expected: 0
>> Files Restored: 0
>> Bytes Restored: 0
>> Rate: 0.0 KB/s
>> FD Errors: 0
>> FD termination status: OK
>> SD termination status: Error
>> Termination: *** Restore Error ***
>>
>> ******SD in DEBUG******
>> Server-sd: parse_bsr.c:168 Leave parse_bsf()
>> Next : 0x0
>> Root bsr : 0x91b72a8
>> VolumeName : 2006-12-07-0
>> MediaType : File-9353
>> Device :
>> Slot : 0
>> SessId : 1
>> SessTime : 1165524894
>> VolFile : 0-0
>> VolBlock : 929920-1430482
>> FileIndex : 1-468
>> done : no
>> positioning : 1
>> fast_reject : 1
>> Server-sd: fd_cmds.c:135 <filed: read data 2
>> Server-sd: fd_cmds.c:261 Read data: read data 2
>> Server-sd: fd_cmds.c:263 <bfiled: read data 2
>> Server-sd: read.c:46 Start read data.
>> Server-sd: parse_bsr.c:913 Added volume=2006-12-07-0 mediatype=File-9353
>> Server-sd: read.c:62 Found 1 volumes names to restore. First=2006-12-07-0
>> Server-sd: device.c:352 lock 0 from dev.c:697
>> Server-sd: device.c:395 block set 3 from dev.c:698
>> Server-sd: acquire.c:80 dir_get_volume_info
>> Server-sd: askdir.c:211 >dird: CatReq Job=Restore.2006-12-07_15.58.46
>> GetVolInfo
>> VolName=2006-12-07-0 write=0
>> Server-sd: askdir.c:165 <dird 1997 Volume "2006-12-07-0" not in catalog.
>> Server-sd: askdir.c:177 Bad response from Dir fields=-1: 1997 Volume
>> "2006-12-07-0" not in catalog.
>> Server-sd: acquire.c:100 bstored: open vol=
>> Server-sd: dev.c:276 open dev: tape=0 dev_name="_BensLaptop"
>> (/var/bacula/mnt/file/_BensLaptop) vol= mode=OPEN_READ_ONLY
>> Server-sd: dev.c:285 call open_file_device mode=OPEN_READ_ONLY
>> Server-sd: acquire.c:195 Dec reserve=0 dev="_BensLaptop"
>> (/var/bacula/mnt/file/_BensLaptop)
>> Server-sd: device.c:408 unblock BST_DOING_ACQUIRE from dev.c:705
>> Server-sd: acquire.c:200 jcr->dcr=(nil)
>> Server-sd: match_bsr.c:169 No nxt_bsr use_pos=1 repos=1
>> Server-sd: device.c:352 lock 0 from acquire.c:353
>> Server-sd: acquire.c:354 release_device device is disk
>> Server-sd: reserve.c:200 free_volume: no vol on dev "_BensLaptop"
>> (/var/bacula/mnt/file/_BensLaptop)
>> Server-sd: dev.c:1691 really close_dev "_BensLaptop"
>> (/var/bacula/mnt/file/_BensLaptop)
>> Server-sd: dvd.c:93 Enter unmount_dev
>> Server-sd: reserve.c:200 free_volume: no vol on dev "_BensLaptop"
>> (/var/bacula/mnt/file/_BensLaptop)
>> Server-sd: device.c:381 unlock from acquire.c:437
>> Server-sd: read.c:83 Done reading.
>> Server-sd: dircmd.c:211 Command run requsts quit
>> Server-sd: mem_pool.c:363 garbage collect memory pool
>>
>>
>>
>>
>>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users