Bacula-users

Re: [Bacula-users] Running a restore job

2008-04-08 00:18:04
Subject: Re: [Bacula-users] Running a restore job
From: thing AT thing.dyndns DOT org
To: thing AT thing.dyndns DOT org
Date: Tue, 08 Apr 2008 16:13:58 +1200 (NZST)
Hi,

If I run the bacula-sd daemon directly and avoid the start up script it
runs and I can connect....(doing a status then 2).

hermes:/var/run/bacula# ls -l
total 12
-rw-r----- 1 root root 6 2008-04-08 16:01 bacula-dir.9101.pid
-rw-r----- 1 root root 6 2008-04-08 16:01 bacula-fd.9102.pid
-rw-r----- 1 root root 6 2008-04-08 16:05 bacula-sd.9103.pid
hermes:/var/run/bacula#

So this suggests an error in the .conf or the start up script?

#
# Default Bacula Storage Daemon Configuration file
#
#  For Bacula release 1.38.11 (28 June 2006) -- debian 4.0
#
# 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 = hermes-sd
  SDPort = 9103                  # Director's port
  WorkingDirectory = "/var/lib/bacula"
  Pid Directory = "/var/run/bacula"
  Maximum Concurrent Jobs = 20
  SDAddress = 127.0.0.1
  #ssj SDAddress = 192.168.1.254
}

#
# List Directors who are permitted to contact Storage daemon
#
Director {
  Name = hermes-dir
  Password = "xxxxx"
}

#
# Restricted Director, used by tray-monitor to get the
#   status of the storage daemon
#
Director {
  Name = hermes-mon
  Password = "xxxxxxx"
  Monitor = yes
}

#
# Devices supported by this Storage daemon
# To connect, the Director's bacula-dir.conf must have the
#  same Name and MediaType.
#

Device {
  Name = FileStorage
  Media Type = File
  Archive Device = /backup-250g-01
  #Archive Device = /tmp
  LabelMedia = yes;                   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;               # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
}

#
# An autochanger device with two drives
#
#Autochanger {
#  Name = Autochanger
#  Device = Drive-1
#  Device = Drive-2
#  Changer Command = "/home/kern/bacula/bin/mtx-changer %c %o %S %a %d"
#  Changer Device = /dev/sg0
#}

#Device {
#  Name = Drive-1                      #
#  Drive Index = 0
#  Media Type = DLT-8000
#  Archive Device = /dev/nst0
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  AutoChanger = yes
#  # Enable the Alert command only if you have the mtx package loaded
#  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
#}

#Device {
#  Name = Drive-2                      #
#  Drive Index = 1
#  Media Type = DLT-8000
#  Archive Device = /dev/nst1
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  AutoChanger = yes
#  # Enable the Alert command only if you have the mtx package loaded
#  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
#}

#
# A Linux or Solaris tape drive
#
#Device {
#  Name = DDS-4                        #
#  Media Type = DDS-4
#  Archive Device = /dev/nrst0
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
## Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
# Changer Device = /dev/sg0
## AutoChanger = yes
#  # Enable the Alert command only if you have the mtx package loaded
## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
#}

#  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
#}

#
# A Linux or Solaris tape drive
#
#ssj Device {
#  Name = DLT3                        #
#  Media Type = DLT-4000
#  Archive Device = /dev/st0
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#RandomAccess = no;
# Enable the Alert command only if you have the mtx package loaded
#ssj }
#
#
# A FreeBSD tape drive
#
#Device {
#  Name = DDS-4
#  Description = "DDS-4 for FreeBSD"
#  Media Type = DDS-4
#  Archive Device = /dev/nsa1
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes
#  Offline On Unmount = no
#  Hardware End of Medium = no
#  BSF at EOM = yes
#  Backward Space Record = no
#  Fast Forward Space File = no
#  TWO EOF = yes
#}

#
# A OnStream tape drive.
# You need the kernel osst driver 0.9.14 or later, and
#   do "mt -f /dev/nosst0 defblksize 32768" once as root.
#
#Device {
#  Name = OnStream
#  Description = "OnStream drive on Linux"
#  Media Type = OnStream
#  Archive Device = /dev/nrst0
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes
#  Offline On Unmount = no
## The min/max blocksizes of 32768 are *required*
#  Minimum Block Size = 32768
#  Maximum Block Size = 32768
#}

#
# A DVD device
#
#Device {
#  Name = "DVD-Writer"
#  Media Type = DVD
#  Archive Device = /dev/hdc
#  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/cdrom;
#  MountCommand = "/bin/mount -t iso9660 -o ro %a %m";
#  UnmountCommand = "/bin/umount %m";
#  SpoolDirectory = /tmp/backup;
#  WritePartCommand = "/etc/bacula/dvd-handler %a write %e %v"
#  FreeSpaceCommand = "/etc/bacula/dvd-handler %a free"
#}

#
# For OpenBSD OS >= 3.6
#
#Device {
#  Name = DDS-3
#  Media Type = DDS-3
#  Archive Device = /dev/nrst0
#  Use MTIOCGET= no
#  BSF at EOM = yes
#  TWO EOF = no
#  AutomaticMount = yes;
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#}

#
# A very old Exabyte with no end of media detection
#
#Device {
#  Name = "Exabyte 8mm"
#  Media Type = "8mm"
#  Archive Device = /dev/nrst0
#  Hardware end of medium = No;
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = Yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#}

#
# Send all messages to the Director,
# mount messages also are sent to the email address
#
Messages {
  Name = Standard
  director = hermes-dir = all
}





> Hi,
>
> I seem to have a dead storage daemon....at least I think this is the
> issue....it seems unable to start or at least continue running....I cant
> see it logging its issue anywhere....
>
>  From the bconsole while running a status this pops up,
>
> 8><--------
> 8-Apr 15:44 hermes-dir: *Console*.2008-04-08_15.38.10 Fatal error:
> bnet.c:859 Unable to connect to Storage daemon on localhost:9103.
> ERR=Connection refused
> 8><--------
>
> Indeed when i try and connect I get,
>
> *status
> Status available for:
>      1: Director
>      2: Storage
>      3: Client
>      4: All
> Select daemon type for status (1-4): 2
> Automatically selected Storage: File
> Connecting to Storage daemon File at localhost:9103
>
> Failed to connect to Storage daemon File.
> ====
> *
>
> ?
>
> Looking at the pid directory when i retart the dir or fd the PID updates,
> for the sd no pid is written, so this suggests the sd is failing to start?
>
> hermes:/var/run/bacula# ls -l
> total 8
> -rw-r----- 1 root root 6 2008-04-08 15:57 bacula-dir.9101.pid
> -rw-r----- 1 root root 6 2008-04-08 15:19 bacula-fd.9102.pid
> hermes:/var/run/bacula# ls -l
> total 8
> -rw-r----- 1 root root 6 2008-04-08 15:57 bacula-dir.9101.pid
> -rw-r----- 1 root root 6 2008-04-08 15:19 bacula-fd.9102.pid
> hermes:/var/run/bacula# ls -l
> total 8
> -rw-r----- 1 root root 6 2008-04-08 16:01 bacula-dir.9101.pid
> -rw-r----- 1 root root 6 2008-04-08 15:19 bacula-fd.9102.pid
> hermes:/var/run/bacula# ls -l
> total 8
> -rw-r----- 1 root root 6 2008-04-08 16:01 bacula-dir.9101.pid
> -rw-r----- 1 root root 6 2008-04-08 16:01 bacula-fd.9102.pid
> hermes:/var/run/bacula#
>
> Any ideas please?
>
> regards
>
> Steven
>
>
>> Hi,
>>
>> I am attempting to do a full restore to the default file location,
>> (following the tutorial) typing status seems to indicate that this is
>> running, however after 30mins nothing has been written back to the disk.
>>
>> I type status and I get,
>>
>> bermes:/backup-250g-01/bacula-restores# bconsole
>> Connecting to Director localhost:9101
>> 1000 OK: hermes-dir Version: 1.38.11 (28 June 2006)
>> Enter a period to cancel a command.
>> *status
>> Using default Catalog name=MyCatalog DB=bacula
>> Status available for:
>>      1: Director
>>      2: Storage
>>      3: Client
>>      4: All
>> Select daemon type for status (1-4): 4
>> hermes-dir Version: 1.38.11 (28 June 2006) i486-pc-linux-gnu debian 4.0
>> Daemon started 06-Apr-08 10:09, 11 Jobs run since started.
>>
>> Scheduled Jobs:
>> Level          Type     Pri  Scheduled          Name
>> Volume
>> ===================================================================================
>> Incremental    Backup    10  08-Apr-08 23:05    Client1
>> backup-250g-01
>> Full           Backup    11  08-Apr-08 23:10    BackupCatalog
>> backup-250g-01
>> ====
>>
>> Running Jobs:
>>  JobId Level   Name                       Status
>> ======================================================================
>>     46         RestoreFiles.2008-04-08_14.01.17 is running
>> ====
>>
>> Terminated Jobs:
>>  JobId  Level     Files      Bytes     Status   Finished        Name
>> ========================================================================
>>     36  Full          0              0 Error    04-Apr-08 23:10
>> BackupCatalog
>>     37  Incr        275      5,816,324 OK       05-Apr-08 23:05 Client1
>>     38  Full          0              0 Error    05-Apr-08 23:10
>> BackupCatalog
>>     39  Incr        600     41,624,135 OK       06-Apr-08 12:46 Client1
>>     40  Full     36,530 29,918,835,561 OK       07-Apr-08 02:58 Client1
>>     41  Full          0              0 Error    07-Apr-08 02:58
>> BackupCatalog
>>     42  Incr      1,291    573,238,771 OK       07-Apr-08 23:07 Client1
>>     43  Full          0              0 Error    07-Apr-08 23:10
>> BackupCatalog
>>     44                0              0 Error    08-Apr-08 06:52
>> RestoreFiles
>>     45                0              0 Error    08-Apr-08 06:54
>> RestoreFiles
>>
>> ====
>> Connecting to Storage daemon File at localhost:9103
>>
>> hermes-sd Version: 1.38.11 (28 June 2006) i486-pc-linux-gnu debian 4.0
>> Daemon started 06-Apr-08 10:08, 3 Jobs run since started.
>>
>> Running Jobs:
>> Reading: Full Restore job RestoreFiles JobId=46 Volume="backup-250g-01"
>>     pool="Default" device=""FileStorage" (/backup-250g-01)"
>>     Files=0 Bytes=0 Bytes/sec=0
>>     FDReadSeqNo=302 in_msg=301 out_msg=6 fd=8
>> ====
>>
>> Jobs waiting to reserve a drive:
>> ====
>>
>> Terminated Jobs:
>>  JobId  Level   Files          Bytes Status   Finished        Name
>> ======================================================================
>>     25  Diff        358    117,504,992 OK       30-Mar-08 23:05 Client1
>>     27  Incr        287     58,745,822 OK       31-Mar-08 23:05 Client1
>>     29  Incr        281    112,378,049 OK       01-Apr-08 23:05 Client1
>>     31  Incr        653     95,438,092 OK       02-Apr-08 23:06 Client1
>>     33  Incr        308    140,323,417 OK       03-Apr-08 23:05 Client1
>>     35  Incr        285     72,350,997 OK       04-Apr-08 23:05 Client1
>>     37  Incr        275      5,865,051 OK       05-Apr-08 23:05 Client1
>>     39  Incr        600     41,696,193 OK       06-Apr-08 12:46 Client1
>>     40  Full     36,530 29,923,935,658 OK       07-Apr-08 02:58 Client1
>>     42  Incr      1,291    573,422,556 OK       07-Apr-08 23:07 Client1
>> ====
>>
>> Device status:
>> Device "FileStorage" (/backup-250g-01) is mounted with
>> Volume="backup-250g-01" Pool="Default"
>>     Total Bytes Read=4,731,632,640 Blocks Read=73,345 Bytes/block=64,512
>>     Positioned at File=1 Block=436,497,449
>> Device "DLT3" (/dev/st0) open but no Bacula volume is mounted.
>>     Total Bytes Read=0 Blocks Read=0 Bytes/block=0
>>     Positioned at File=0 Block=0
>> ====
>>
>> In Use Volume status:
>> backup-250g-01 on device "FileStorage" (/backup-250g-01)
>> ====
>>
>> Connecting to Client hermes-fd at localhost:9102
>>
>> hermes-fd Version: 1.38.11 (28 June 2006)  i486-pc-linux-gnu debian 4.0
>> Daemon started 06-Apr-08 10:08, 3 Jobs run since started.
>>
>> Terminated Jobs:
>>  JobId  Level     Files         Bytes  Status   Finished        Name
>> ======================================================================
>>     25  Diff        358    117,446,543 OK       30-Mar-08 23:05 Client1
>>     27  Incr        287     58,695,470 OK       31-Mar-08 23:05 Client1
>>     29  Incr        281    112,328,453 OK       01-Apr-08 23:05 Client1
>>     31  Incr        653     95,357,542 OK       02-Apr-08 23:06 Client1
>>     33  Incr        308    140,270,579 OK       03-Apr-08 23:05 Client1
>>     35  Incr        285     72,301,093 OK       04-Apr-08 23:05 Client1
>>     37  Incr        275      5,816,324 OK       05-Apr-08 23:05 Client1
>>     39  Incr        600     41,624,135 OK       06-Apr-08 12:46 Client1
>>     40  Full     36,530 29,918,835,561 OK       07-Apr-08 02:58 Client1
>>     42  Incr      1,291    573,238,771 OK       07-Apr-08 23:07 Client1
>> ====
>> Running Jobs:
>> JobId 46 Job RestoreFiles.2008-04-08_14.01.17 is running.
>>     Restore Job started: 08-Apr-08 14:01
>>     Files=0 Bytes=0 Bytes/sec=0
>>     Files Examined=0
>>     SDReadSeqNo=7 fd=7
>> Director connected at: 08-Apr-08 14:33
>> ====
>> *hermes:/backup-250g-01/bacula-restores#
>>
>> So what did I do wrong/missed?
>>
>> regards
>>
>> Steven
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>> Register now and save $200. Hurry, offer ends at 11:59 p.m.,
>> Monday, April 7! Use priority code J8TLD2.
>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>> _______________________________________________
>> Bacula-users mailing list
>> Bacula-users AT lists.sourceforge DOT net
>> https://lists.sourceforge.net/lists/listinfo/bacula-users
>>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Register now and save $200. Hurry, offer ends at 11:59 p.m.,
> Monday, April 7! Use priority code J8TLD2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users