[Bacula-users] How to change which drive is used by default

2020-11-19 Thread byron
I'm running version 9.0.6 on debian stretch

I have a tape library with two drives configured as follows in
bacula-sd.conf.  I run 10 jobs every night and they always all run on
Drive-1.  I'm now having a problem with that Drive and would like to force
all jobs to run on Drive-2.  What's the easiest way to do that?

Thanks

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




Device {
  Name = Drive-1
  Media Type = LTO-7
  Archive Device = /dev/tapedrive1
  #Archive Device = /dev/tape/by-id/scsi-350014380272c4ac9-nst # points to
nst1
  Drive Index = 0
  AutomaticMount = yes;   # when device opened, read it
  AlwaysOpen = yes;
  RemovableMedia = yes;
  RandomAccess = no;
  Maximum File Size = 50GB
#  Maximum Block Size = 1048576
  Maximum Block Size = 524288
#  Maximum Block Size = 262144
  #Maximum Network Buffer Size = 65536
  Changer Command = "/soft/general/bacula-9.0.6/conf/mtx-changer %c %o %S
%a %d"
  Changer Device = /dev/changer
 #Changer Device = /dev/sg0
  AutoChanger = yes
  Spool Directory = /bacula/spool/
  #
  # New alert command in Bacula 9.0.0
  #  Note: you must have the sg3_utils (rpms) or the
  #sg3-utils (deb) installed on your system.
  #and you must set the correct control device that
  #corresponds to the Archive Device
  Control Device = /dev/tapescsi1  # must be SCSI ctl for /dev/nst0
  Alert Command = "/soft/general/bacula-9.0.6/conf/tapealert %l"

  # Enable the Alert command only if you have the mtx package loaded
# Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
# If you have smartctl, enable this, it has more info than tapeinfo
 #Alert Command = "sh -c 'smartctl -H -l error %c'"
}

Device {
  Name = Drive-2
  Drive Index = 1
  Media Type = LTO-7
  Archive Device = /dev/tapedrive2
  #Archive Device = /dev/tape/by-id/scsi-350014380272c4acc-nst # points to
nst0
  AutomaticMount = yes;   # when device opened, read it
  AlwaysOpen = yes;
  RemovableMedia = yes;
  RandomAccess = no;
  Maximum File Size = 50GB
#  Maximum Block Size = 1048576
  Maximum Block Size = 524288
#  Maximum Block Size = 262144
  #Maximum Network Buffer Size = 65536
  Changer Command = "/soft/general/bacula-9.0.6/conf/mtx-changer %c %o %S
%a %d"
  Changer Device = /dev/changer
 #Changer Device = /dev/sg0
  AutoChanger = yes
  Spool Directory = /bacula/spool/
  #
  # New alert command in Bacula 9.0.0
  #  Note: you must have the sg3_utils (rpms) or the
  #sg3-utils (deb) installed on your system.
  #and you must set the correct control device that
  #corresponds to the Archive Device
  Control Device = /dev/tapescsi2  # must be SCSI ctl for /dev/nst0
  Alert Command = "/soft/general/bacula-9.0.6/conf/tapealert %l"

  # Enable the Alert command only if you have the mtx package loaded
# Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
# If you have smartctl, enable this, it has more info than tapeinfo
 #Alert Command = "sh -c 'smartctl -H -l error %c'"
}
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Unable to mount a volume using bscan

2020-09-02 Thread byron
I worked it out.  I needed to stop bacula and then mount the tape using the
bacula mtx-changer script.

Also bacula needed to be stopped as well before running bscan itself.

On Wed, Sep 2, 2020 at 1:28 PM byron  wrote:

> I need to run bscan to read in a LT05 tape.   I'm able to mount the tape
> using bconsole but when I run the bscan command it asks me to mount the
> volume on the device when it already is mounted.  Unfortunately I've never
> installed and configured bacula so I dont really know where to start with
> this.  Any pointers appreciated.   Here is the output from what I've been
> trying
>
> *
> *mount drive=1  slot=39
> Automatically selected Catalog: MyCatalog
> Using Catalog "MyCatalog"
> The defined Storage resources are:
>  1: File
>  2: LTO-5
> Select Storage resource (1-2): 2
> 3307 Issuing autochanger "unload slot 2, drive 1" command.
> 3304 Issuing autochanger "load slot 39, drive 1" command.
> 3305 Autochanger "load slot 39, drive 1", status is OK.
> 3001 Mounted Volume: AID378
> 3001 Device ""Drive-1" (/dev/nst0)" is already mounted with Volume "AID378"
> *
>
> when I run the status command it shows the tape is mounted
> ==
>
> Device "Drive-1" (/dev/nst0) is mounted with:
> Volume:  AID378
> Pool:*unknown*
> Media type:  LTO-5
> Slot 39 is loaded in drive 1.
> Total Bytes Read=1,024 Blocks Read=1 Bytes/block=1,024
> Positioned at File=0 Block=0
> ==
>
> Device "Drive-2" (/dev/nst1) is not open.
> Drive 0 is not loaded.
> ==
> 
>
> Used Volume status:
> Reserved volume: AID378 on tape device "Drive-1" (/dev/nst0)
> Reader=0 writers=0 reserves=0 volinuse=0
> 
>
> But when I run the bscan command it cant access the volume
> sudo bscan -c bacula-sd.conf -v -V AID378 /dev/nst0
> bscan: butil.c:287 Using device: "/dev/nst0" for reading.
> 02-Sep 12:45 bscan JobId 0: No slot defined in catalog (slot=0) for Volume
> "AID378" on "Drive-1" (/dev/nsudo bscan -c bacula-sd.conf -v -V AID378
> /dev/nst0
> bscan: butil.c:287 Using device: "/dev/nst0" for reading.
> 02-Sep 12:45 bscan JobId 0: No slot defined in catalog (slot=0) for Volume
> "AID378" on "Drive-1" (/dev/nst0).
> 02-Sep 12:45 bscan JobId 0: Cartridge change or "update slots" may be
> required.
> 02-Sep 12:45 bscan JobId 0: 3301 Issuing autochanger "loaded? drive 1"
> command.
> 02-Sep 12:45 bscan JobId 0: 3302 Autochanger "loaded? drive 1", result is
> Slot 39.
> 02-Sep 12:50 bscan JobId 0: Warning: acquire.c:239 Read open device
> "Drive-1" (/dev/nst0) Volume "AID378" failed: ERR=dev.c:506 Unable to open
> device "Drive-1" (/dev/nst0): ERR=Device or resource busy
>
> 02-Sep 12:50 bscan JobId 0: No slot defined in catalog (slot=0) for Volume
> "AID378" on "Drive-1" (/dev/nst0).
> 02-Sep 12:50 bscan JobId 0: Cartridge change or "update slots" may be
> required.
> Mount Volume "AID378" on device "Drive-1" (/dev/nst0) and press return
> when ready:st0).
> 02-Sep 12:45 bscan JobId 0: Cartridge change or "update slots" may be
> required.
> 02-Sep 12:45 bscan JobId 0: 3301 Issuing autochanger "loaded? drive 1"
> command.
> 02-Sep 12:45 bscan JobId 0: 3302 Autochanger "loaded? drive 1", result is
> Slot 39.
> 02-Sep 12:50 bscan JobId 0: Warning: acquire.c:239 Read open device
> "Drive-1" (/dev/nst0) Volume "AID378" failed: ERR=dev.c:506 Unable to open
> device "Drive-1" (/dev/nst0): ERR=Device or resource busy
>
> 02-Sep 12:50 bscan JobId 0: No slot defined in catalog (slot=0) for Volume
> "AID378" on "Drive-1" (/dev/nst0).
> 02-Sep 12:50 bscan JobId 0: Cartridge change or "update slots" may be
> required.
> Mount Volume "AID378" on device "Drive-1" (/dev/nst0) and press return
> when ready:
>
> Thanks
>
>
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Unable to mount a volume using bscan

2020-09-02 Thread byron
I need to run bscan to read in a LT05 tape.   I'm able to mount the tape
using bconsole but when I run the bscan command it asks me to mount the
volume on the device when it already is mounted.  Unfortunately I've never
installed and configured bacula so I dont really know where to start with
this.  Any pointers appreciated.   Here is the output from what I've been
trying

*
*mount drive=1  slot=39
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
The defined Storage resources are:
 1: File
 2: LTO-5
Select Storage resource (1-2): 2
3307 Issuing autochanger "unload slot 2, drive 1" command.
3304 Issuing autochanger "load slot 39, drive 1" command.
3305 Autochanger "load slot 39, drive 1", status is OK.
3001 Mounted Volume: AID378
3001 Device ""Drive-1" (/dev/nst0)" is already mounted with Volume "AID378"
*

when I run the status command it shows the tape is mounted
==

Device "Drive-1" (/dev/nst0) is mounted with:
Volume:  AID378
Pool:*unknown*
Media type:  LTO-5
Slot 39 is loaded in drive 1.
Total Bytes Read=1,024 Blocks Read=1 Bytes/block=1,024
Positioned at File=0 Block=0
==

Device "Drive-2" (/dev/nst1) is not open.
Drive 0 is not loaded.
==


Used Volume status:
Reserved volume: AID378 on tape device "Drive-1" (/dev/nst0)
Reader=0 writers=0 reserves=0 volinuse=0


But when I run the bscan command it cant access the volume
sudo bscan -c bacula-sd.conf -v -V AID378 /dev/nst0
bscan: butil.c:287 Using device: "/dev/nst0" for reading.
02-Sep 12:45 bscan JobId 0: No slot defined in catalog (slot=0) for Volume
"AID378" on "Drive-1" (/dev/nsudo bscan -c bacula-sd.conf -v -V AID378
/dev/nst0
bscan: butil.c:287 Using device: "/dev/nst0" for reading.
02-Sep 12:45 bscan JobId 0: No slot defined in catalog (slot=0) for Volume
"AID378" on "Drive-1" (/dev/nst0).
02-Sep 12:45 bscan JobId 0: Cartridge change or "update slots" may be
required.
02-Sep 12:45 bscan JobId 0: 3301 Issuing autochanger "loaded? drive 1"
command.
02-Sep 12:45 bscan JobId 0: 3302 Autochanger "loaded? drive 1", result is
Slot 39.
02-Sep 12:50 bscan JobId 0: Warning: acquire.c:239 Read open device
"Drive-1" (/dev/nst0) Volume "AID378" failed: ERR=dev.c:506 Unable to open
device "Drive-1" (/dev/nst0): ERR=Device or resource busy

02-Sep 12:50 bscan JobId 0: No slot defined in catalog (slot=0) for Volume
"AID378" on "Drive-1" (/dev/nst0).
02-Sep 12:50 bscan JobId 0: Cartridge change or "update slots" may be
required.
Mount Volume "AID378" on device "Drive-1" (/dev/nst0) and press return when
ready:st0).
02-Sep 12:45 bscan JobId 0: Cartridge change or "update slots" may be
required.
02-Sep 12:45 bscan JobId 0: 3301 Issuing autochanger "loaded? drive 1"
command.
02-Sep 12:45 bscan JobId 0: 3302 Autochanger "loaded? drive 1", result is
Slot 39.
02-Sep 12:50 bscan JobId 0: Warning: acquire.c:239 Read open device
"Drive-1" (/dev/nst0) Volume "AID378" failed: ERR=dev.c:506 Unable to open
device "Drive-1" (/dev/nst0): ERR=Device or resource busy

02-Sep 12:50 bscan JobId 0: No slot defined in catalog (slot=0) for Volume
"AID378" on "Drive-1" (/dev/nst0).
02-Sep 12:50 bscan JobId 0: Cartridge change or "update slots" may be
required.
Mount Volume "AID378" on device "Drive-1" (/dev/nst0) and press return when
ready:

Thanks
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Is it possible to tell bacula to not run a job for the next week?

2019-03-01 Thread byron
Thanks a million guys - it looks like I may actually get out of the office
at a reasonable time after all

On Fri, Mar 1, 2019 at 4:19 PM Wanderlei Huttel 
wrote:

> Hello Byron.
>
> You can use the command
> disable job=job-name
>
> Enviado de Motorola Moto Z2 Play
>
> Wanderlei Hüttel
>
> Em sex, 1 de mar de 2019 12:05, byron  escreveu:
>
>> I have 10 jobs that run every night and write to the same pool of tapes.
>>
>> Tonight is the night they run their monthly full backups but I am short
>> on tapes.  I'd like to put a hold on running some of the lower priority
>> jobs to allow the others to run all the way through to completion.  Then
>> next week when I add in the new tapes I'll restart the remaining jobs that
>> were put on hold.
>>
>> Is there anyway to do this through bconsole or do I need to remove the
>> jobs that I don't want to run from the configuration files and add them
>> back in next week?
>>
>> Many thanks
>> ___
>> Bacula-users mailing list
>> Bacula-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bacula-users
>>
>
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Is it possible to tell bacula to not run a job for the next week?

2019-03-01 Thread byron
I have 10 jobs that run every night and write to the same pool of tapes.

Tonight is the night they run their monthly full backups but I am short on
tapes.  I'd like to put a hold on running some of the lower priority jobs
to allow the others to run all the way through to completion.  Then next
week when I add in the new tapes I'll restart the remaining jobs that were
put on hold.

Is there anyway to do this through bconsole or do I need to remove the jobs
that I don't want to run from the configuration files and add them back in
next week?

Many thanks
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] bacula "Cannot find any appendable volumes" but list volumes shows otherwise

2019-02-06 Thread byron
Hi

I write my backups to LTO 7 tape.  I have 3 sets of tapes which i rotate
every month.  I run one full backup at the start of the month and then
incrementals for the rest of the month.

I've been running these jobs for a few months now and have never seen this
problem.

This month the full backups were running smoothly and had filled 11 tapes
and then stopped with the following error

nibbler-sd JobId 4139: Job eslab.2019-02-06_15.40.27_08 is waiting. Cannot
find any appendable volumes.
Please use the "label" command to create a new Volume for:
Storage: "Drive-1" (/dev/tapedrive1)
Pool: Labs
Media type: LTO-7

However when I run "list volume" in bconsole it shows that there are plenty
of volumes available.  Also I see no difference between the available
volumes and the others 11 it was able to write to.

Pool: Labs
+-++---+-++--+--+-+--+---+---+-+--+-+---+
| mediaid | volumename | volstatus | enabled | volbytes   |
volfiles | volretention | recycle | slot | inchanger | mediatype | voltype
| volparts | lastwritten | expiresin |
+-++---+-++--+--+-+--+---+---+-+--+-+---+
|   2 | LAB002L7   | Full  |   1 | 10,083,116,090,368 |
204 |7,776,000 |   1 |   14 | 1 | LTO-7 |   2
|0 | 2018-11-03 03:04:02 | 0 |
|   3 | LAB003L7   | Full  |   1 |  9,651,812,668,416 |
194 |7,776,000 |   1 |   10 | 1 | LTO-7 |   2
|0 | 2018-11-05 21:28:39 | 0 |
|   4 | LAB004L7   | Full  |   1 |  7,373,476,856,832 |
147 |7,776,000 |   1 |   19 | 1 | LTO-7 |   2
|0 | 2018-11-06 19:13:34 | 0 |
|   5 | LAB005L7   | Full  |   1 |  8,344,623,933,440 |
166 |7,776,000 |   1 |   15 | 1 | LTO-7 |   2
|0 | 2018-11-08 12:47:16 | 0 |
|   6 | LAB006L7   | Full  |   1 |  8,224,654,758,912 |
164 |7,776,000 |   1 |   11 | 1 | LTO-7 |   2
|0 | 2018-11-07 02:44:29 | 0 |
|   7 | LAB007L7   | Full  |   1 |  8,141,419,162,624 |
162 |7,776,000 |   1 |8 | 1 | LTO-7 |   2
|0 | 2018-11-07 10:15:38 | 0 |
|   8 | LAB008L7   | Full  |   1 |  9,178,463,554,560 |
183 |7,776,000 |   1 |5 | 1 | LTO-7 |   2
|0 | 2018-11-07 18:43:17 | 0 |
|   9 | LAB009L7   | Full  |   1 |  7,620,054,748,160 |
152 |7,776,000 |   1 |2 | 1 | LTO-7 |   2
|0 | 2018-11-06 04:37:55 | 0 |
|  11 | LAB001L7   | Full  |   1 |  8,706,243,009,536 |
174 |7,776,000 |   1 |   18 | 1 | LTO-7 |   2
|0 | 2018-11-08 03:09:23 | 0 |
|  13 | LAB010L7   | Full  |   1 |  8,101,448,123,392 |
162 |7,776,000 |   1 |9 | 1 | LTO-7 |   2
|0 | 2018-11-06 12:13:09 | 0 |
|  14 | LAB011L7   | Full  |   1 |  7,217,116,941,312 |
144 |7,776,000 |   1 |0 | 0 | LTO-7 |   2
|0 | 2018-11-08 21:28:51 |21,234 |
|  15 | LAB012L7   | Full  |   1 |  8,524,868,334,592 |
174 |7,776,000 |   1 |0 | 0 | LTO-7 |   2
|0 | 2018-12-18 20:32:00 | 3,473,823 |
|  16 | LAB013L7   | Full  |   1 |  7,077,963,338,752 |
142 |7,776,000 |   1 |0 | 0 | LTO-7 |   2
|0 | 2018-12-21 23:10:57 | 3,742,560 |

Its my understanding that if the value "expiresin" in is set to "0" then
the backups should be able to use it  (I appreciate there are other values
such as ""recycle" that come into play but since these tape are being
recycled for the nth time I dont see how they could be wrong).

Any help much appreciated.

Thanks
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] "Sending spooled attrs to the Director" taking over 13 hours

2018-11-23 Thread byron
I've started in a new job and am having a problem with bacula where the "
Sending spooled attrs to the Director" stage is taking over 13 hours at
which point i canceled the job as I didn't understand what was going on.

Bacula is version 7.0.5 running on debian 7.

The client is a xen host with 12 virtual machines, so there are 12 jobs
running on the client.  Each job runs a before run script to create a
snapshot of the vm.

Other jobs on the bacula server to other clients currently run without any
problem.

The backups to this client were running without any problem when I first
arrived on the job 3 weeks ago.

One thing that could have caused it is when i canceled some jobs through
bconsole that were running from this client.  They had been on hold for
several days awaiting new media and I canceled them as I had to do a
restore.

The only other thing of note is that the time is currently out on the
client, its almost 12 minutes behind.

Here is the end of the job output.  Everything is the same as a successful
previous job except for the time for sending spooled attribs and my then
canceling it.

2018-11-21 22:56:15 hal9000-sd JobId 36667: Despooling elapsed time =
00:01:05, Transfer rate = 133.5 M Bytes/second
2018-11-21 22:56:17 hal9000-sd JobId 36667: Elapsed time=00:48:54, Transfer
rate=32.22 M Bytes/second
2018-11-21 22:56:17 hal9000-sd JobId 36667: Alert: smartctl 5.41 2011-06-09
r3365 [x86_64-linux-3.2.0-4-amd64] (local build)
2018-11-21 22:56:17 hal9000-sd JobId 36667: Alert: Copyright (C) 2002-11 by
Bruce Allen, http://smartmontools.sourceforge.net
2018-11-21 22:56:17 hal9000-sd JobId 36667: Alert:
2018-11-21 22:56:18 hal9000-sd JobId 36667: Alert: TapeAlert: OK
2018-11-21 22:56:18 hal9000-sd JobId 36667: Alert:
2018-11-21 22:56:18 hal9000-sd JobId 36667: Alert: Error Counter logging
not supported
2018-11-21 22:56:18 hal9000-sd JobId 36667: Sending spooled attrs to the
Director. Despooling 67,680,530 bytes ...
2018-11-22 13:15:04 hal9000-dir JobId 36667: Bacula hal9000-dir 7.0.5
(28Jul14):
Build OS: x86_64-unknown-linux-gnu debian 7.6
JobId: 36667
Job: gattaca.2018-11-21_22.00.00_18
Backup Level: Full (upgraded from Incremental)
Client: "mothra-fd" 5.2.6 (21Feb12) x86_64-pc-linux-gnu,debian,jessie/sid
FileSet: "gattaca" 2018-01-19 10:08:29
Pool: "DomU-DMZ" (From Job resource)
Catalog: "MyCatalog" (From Client resource)
Storage: "LTO-5" (From Job resource)
Scheduled time: 21-Nov-2018 22:00:00
Start time: 21-Nov-2018 22:03:22
End time: 22-Nov-2018 13:15:04
Elapsed time: 15 hours 11 mins 42 secs
Priority: 10
FD Files Written: 0
SD Files Written: 191,431
FD Bytes Written: 0 (0 B)
SD Bytes Written: 94,547,732,152 (94.54 GB)
Rate: 0.0 KB/s
Software Compression: None
VSS: no
Encryption: no
Accurate: no
Volume name(s): AID365
Volume Session Id: 18
Volume Session Time: 1542820549
Last Volume Bytes: 94,599,663,616 (94.59 GB)
Non-fatal FD errors: 0
SD Errors: 0
FD termination status: Canceled
SD termination status: OK
Termination: Backup Canceled
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users