]> git.sur5r.net Git - bacula/bacula/blob - bacula/examples/autochangers/mtx-changer.Adic-Scalar-100
Add more contributed examples
[bacula/bacula] / bacula / examples / autochangers / mtx-changer.Adic-Scalar-100
1 From bacula-users-admin@lists.sourceforge.net Wed Dec 10 15:04:47 2003
2 Return-Path: <bacula-users-admin@lists.sourceforge.net>
3 Received: from sc8-sf-mx1.sourceforge.net (lists.sourceforge.net
4         [66.35.250.206]) by matou.sibbald.com (8.11.6/8.11.6) with ESMTP id
5         hBAE4lY32735 for <kern@sibbald.com>; Wed, 10 Dec 2003 15:04:47 +0100
6 Received: from sc8-sf-list2-b.sourceforge.net ([10.3.1.8]
7         helo=sc8-sf-list2.sourceforge.net) by sc8-sf-mx1.sourceforge.net with esmtp
8         (TLSv1:AES256-SHA:256) (Exim 4.24) id 1AU4wc-0007gs-Ls; Wed, 10 Dec 2003
9         06:04:02 -0800
10 Received: from localhost.localdomain ([127.0.0.1]
11         helo=projects.sourceforge.net) by sc8-sf-list2.sourceforge.net with esmtp
12         (Exim 4.24) id 1AU4wc-0006AC-FQ; Wed, 10 Dec 2003 06:04:02 -0800
13 Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.12]
14         helo=sc8-sf-mx2.sourceforge.net) by sc8-sf-list2.sourceforge.net with esmtp
15         (Exim 4.24) id 1AU4vz-00068m-GL for bacula-users@lists.sourceforge.net;
16         Wed, 10 Dec 2003 06:03:23 -0800
17 Received: from mta2.navair.navy.mil ([192.58.199.164]) by
18         sc8-sf-mx2.sourceforge.net with esmtp (Exim 4.24) id 1AU4vy-0006U5-2Q for
19         bacula-users@lists.sourceforge.net; Wed, 10 Dec 2003 06:03:22 -0800
20 Received: by mta2.navair.navy.mil (Postfix, from userid 0) id EEB0B16C1FD;
21         Wed, 10 Dec 2003 09:03:10 -0500 (EST)
22 Received: from neim02.nawcad.navy.mil (neim02.nawcad.navy.mil
23         [140.229.37.205]) by mta2.navair.navy.mil (Postfix) with ESMTP id
24         64D5116C2A9; Wed, 10 Dec 2003 09:03:10 -0500 (EST)
25 Received: by neim02.nawcad.navy.mil with Internet Mail Service
26         (5.5.2657.72) id <YQB85LRX>; Wed, 10 Dec 2003 09:02:18 -0500
27 Message-ID: <B9500E218FB4D2119DE30000F810BBBF0486F1B9@nems13.nawcad.navy.mil>
28 From: "Kirkpatrick, Drew  (ARINC)" <KirkpatricDA@navair.navy.mil>
29 To: "'terry@mrtux.co.uk'" <terry@mrtux.co.uk>, bacula-users@lists.sourceforge.net
30 Subject: RE: [Bacula-users] Re: Autochanger setup
31 MIME-Version: 1.0
32 X-Mailer: Internet Mail Service (5.5.2657.72)
33 Content-Type: text/plain; charset="ISO-8859-1"
34 X-Spam-Score: 0.0 (/)
35 X-Spam-Report: Spam Filtering performed by sourceforge.net. See
36         http://spamassassin.org/tag/ for more details. Report problems to
37         https://sf.net/tracker/?func=add&group_id=1&atid=200001 0.0 CLICK_BELOW    
38                Asks you to click below
39 Sender: bacula-users-admin@lists.sourceforge.net
40 Errors-To: bacula-users-admin@lists.sourceforge.net
41 X-BeenThere: bacula-users@lists.sourceforge.net
42 X-Mailman-Version: 2.0.9-sf.net
43 Precedence: bulk
44 List-Unsubscribe:
45         <https://lists.sourceforge.net/lists/listinfo/bacula-users>,
46         <mailto:bacula-users-request@lists.sourceforge.net?subject=unsubscribe>
47 List-Id: Bacula user's email list for support and discussions
48         <bacula-users.lists.sourceforge.net>
49 List-Post: <mailto:bacula-users@lists.sourceforge.net>
50 List-Help: <mailto:bacula-users-request@lists.sourceforge.net?subject=help>
51 List-Subscribe:
52         <https://lists.sourceforge.net/lists/listinfo/bacula-users>,
53         <mailto:bacula-users-request@lists.sourceforge.net?subject=subscribe>
54 List-Archive:
55         <http://sourceforge.net/mailarchive/forum.php?forum=bacula-users>
56 Date: Wed, 10 Dec 2003 09:02:14 -0500
57 X-Spam-Score: 0.0 (/)
58 X-Spam-Report: Spam Filtering performed by sourceforge.net. See
59         http://spamassassin.org/tag/ for more details. Report problems to
60         https://sf.net/tracker/?func=add&group_id=1&atid=200001 0.0 CLICK_BELOW    
61                Asks you to click below
62 Status: RO
63 X-Status: F
64 X-Keywords:                
65 X-UID: 76
66 Content-Transfer-Encoding: 8bit
67
68 So far this seems to be working for me, but it's not all quite finished :)
69
70 Device {
71         Name = "firstTapeDrive"
72         Media Type = AIT3
73         Archive Device = /dev/nst0
74         Changer Device = /dev/sg3
75         Changer Command = "/etc/bacula/mtx-changer %c %o %S %a"
76         AutoChanger = yes
77         Backward Space Record = no
78         RemovableMedia = yes
79         AlwaysOpen = yes
80         AutomaticMount = yes
81         LabelMedia = no
82 #       HardwareEndOfMedium = no
83 }
84
85
86
87 And here's the current version of my mtx-changer script (which changes
88 frequently as I figure out more of this stuff)
89
90 ****************************************************************************
91 **********************
92
93 #!/bin/bash
94
95 # mtx-changer script modded to work with a Adic Scalar 100 better
96 # Drew Kirkpatrick, kirkpatricda@navair.navy.mil
97
98
99 echo "mtx-change called with: "$@
100
101
102 AUTOLOADERDEV=$1
103 DRIVE=0
104 DRIVE_0_SEARCH="Data Transfer Element 0"
105 DRIVE_1_SEARCH="Data Transfer Element 1"
106 MTX=/usr/local/sbin/mtx
107
108
109
110
111 ######################### Functions
112
113
114
115
116 # Take a single argument, a barcode number
117 # and returns the slot in which said tape
118 # should reside according to the 
119 # tapeSlotMap file. That file is
120 # created using the setTapeSlotMap
121 # script
122 getSlotNum()
123 {
124     if [ -z "$1" ]
125         then
126             echo getSlotNum"() called" \
127             "without a parameter, error!!!"
128             exit 1
129     fi
130     
131 # makes sure there is an entry in .tapeSlotMap file
132 # for that barcode number
133     found=`grep "$1" /etc/bacula/.tapeSlotMap | wc -l | awk '{print $1}'`
134
135     if [ "$found" -ne 1 ]
136     then
137         echo "FATAL ERROR, in getSlotNum($1), error looking up" 
138         echo "that barcode number. Found ($found) instances in the" 
139         echo "tapeSlotMap file. There should be 1 instance. Do you" 
140         echo "need to update this file with setTapeSlotMap script???"
141         exit 1
142     fi
143
144     slotNum=`grep "$1" /etc/bacula/.tapeSlotMap | awk '{print $1}'`
145     return $slotNum
146 }
147
148
149
150
151
152
153 # Take 1 arg, a 0 or 1 (or, how about the DRIVE var: )
154 # for the drive it is interested in
155 # returns 1 if that drive has a tape loaded, and 0 if not
156 doesDriveGottaTape() 
157 {
158     if [ -z "$1" ]
159         then
160             echo "doesDriveGottaTape() called" \
161             "without a parameter, error fool!!!"
162             exit 1
163         else
164             case "$1" in
165                 0 )
166                     ANSWER=`${MTX} -f $AUTOLOADERDEV status | grep
167 "$DRIVE_0_SEARCH" \
168                         | awk '{sub("0:",""); print $4}'`
169                 ;;
170                 1 )
171                     ANSWER=`${MTX} -f $AUTOLOADERDEV status | grep
172 "$DRIVE_1_SEARCH" \
173                         | awk '{sub("1:",""); print $4}'`
174                 ;;
175                 * )
176                     echo "Invalid drive num passed to
177 doesDriveGottaTape($1)"
178                     exit 1
179                 ;;
180             esac
181     fi
182     
183     case "$ANSWER" in
184         Full )
185             return 1
186         ;;
187         Empty )
188             return 0
189         ;;
190         * )
191             echo "Fatal error, invalid answer in doesDriveGottaTape(),
192 $ANSWER"
193             exit 1
194         ;;
195     esac        
196 }
197
198
199
200
201
202
203 # This handles 'correctly' unloading a drive to make sure it ends up 
204 # in the slot it originaly came from. If you're moving/adding tapes
205 # please check the setTapeSlotMap script, and use accordingly 
206 # to update the barcode->slot mappings.
207 # This function is needed because the Adic Scalar 100 
208 # doesn't seem to like returning a tape to it's original slot
209 # everytime. It seems to pick the first available, and I can't
210 # seem to figure out how to make it stop doing this. 
211 # oh, and it takes 1 arg, the drive to unload
212 unloadDrive()
213 {
214     if [ -z "$1" ]
215         then
216             echo "unloadDrive() called " \
217             "without a parameter, error!!!"
218             exit 1
219     fi
220
221
222 # double check to see if that drive does actually have a tape in it
223     doesDriveGottaTape "$1"
224     rtn=$?
225     if [ "$rtn" == 0 ]
226     then
227         echo "errrm, in unloadDrive($1), that drive " \
228             "doesn't have a tape in it!!!"
229         return 0
230     fi
231
232     
233 # Get the barcode of the tape in the drive
234     case "$1" in
235         0 )
236             barcode=`${MTX} -f $AUTOLOADERDEV status | grep
237 "$DRIVE_0_SEARCH" | awk '{print $10}'`
238         ;;
239         1 )
240             barcode=`${MTX} -f $AUTOLOADERDEV status | grep
241 "$DRIVE_1_SEARCH" | awk '{print $10}'`
242         ;;
243         * )
244             echo "ERROR, invalid drive num in unloadDrive($1)"
245             exit 1
246         ;;
247     esac
248
249 # return tape with barcode to which slot???
250     getSlotNum "$barcode"
251     returnTo=$?
252
253
254 # unloading the tape now
255     ${MTX} -f $AUTOLOADERDEV unload $returnTo $1
256     rtn=$?
257     if [ "$rtn" -ne 0 ]
258     then
259         echo "MTX came back with code ($rtn)"
260         echo "ERROR, in unloadDrive($1), mtx unload failed"
261         exit 1
262     fi
263     return $rtn
264 }
265
266
267
268
269 # This handles loading tapes into drives
270 # It checks if there is currently a tape
271 # in the target drive, and if there is 
272 # it unloads it prior to loading the new tape
273 # just in case bacula doesn't explicitly 
274 # request this. 
275 # This function take two args, the drive
276 # to load, and the tape slot to load from
277 loadDrive()
278 {
279     if [ -z "$1" ] || [ -z "$2" ]
280     then
281         echo "loadDrive() not called " \
282             "with the correct params, error!!!"
283             exit 1
284     fi
285     
286 # Check to see if it already has a tape in it...
287     doesDriveGottaTape "$1"
288     rtn=$?
289     if [ "$rtn" == 1 ]
290     then
291         echo "Oops, in loadDrive() that drive"
292         echo "already has a tape. Unloading it now"
293         unloadDrive "$1"
294     fi
295
296
297 # You're now ready to load the drive
298     echo "Now loading tape in slot $2 into drive $1"
299
300     ${MTX} -f $AUTOLOADERDEV load $2 $1
301     rtn=$?
302     if [ "$rtn" -ne 0 ]
303     then
304         echo "MTX came back with code ($rtn)"
305         echo "ERROR, in loadDrive($1, $2), mtx load failed"
306         exit 1
307     fi
308     return $rtn
309 }
310
311
312
313
314
315 #######################    End Functions
316
317
318
319
320 #######################    Start Script
321
322 # Changes the nst* device bacula passes to a number that mtx likes
323 if [ "$2" == load ] || [ "$2" == unload ]
324 then
325     echo "In mtx-changer drive selection code...."
326     case "$4" in
327         /dev/nst0 )
328             DRIVE="0"
329         ;;
330
331         /dev/nst1 )
332             DRIVE="1"
333         ;;
334
335         * )
336             echo "Error, invalid drive for autoloader."
337             echo "Maybe you mispelled the drive name, or tried to"
338             echo "use a drive that doesn't exist"
339             echo "Only two drives handled in /etc/bacula/mtx-changer script"
340             exit 1
341         ;;
342     esac
343 fi
344
345
346
347
348 case "$2" in 
349    unload)
350         unloadDrive "$DRIVE"
351         rtn=$?
352         
353         sleep 35
354         exit $rtn
355       ;;
356
357    load)
358         loadDrive "$DRIVE" "$3"
359         rtn=$?
360         sleep 55
361         exit $rtn
362       ;;
363
364    list) 
365       echo "Requested list, DREW YOU HAVEN'T IMPLEMENTED YET!!!!"
366       ${MTX} -f $1 status | grep " *Storage Element [0-9]*:.*Full" |  \
367         awk "{print \$3 \$4}" | sed "s/Full *\(:VolumeTag=\)*//"
368
369       rtn=$?
370       echo "mtx-changer returning value: $rtn"
371       ;;
372
373    loaded)
374       echo "Request loaded, DREW YOU HAVEN'T IMPLEMENTED YET!!!!"
375       ${MTX} -f $1 status >/tmp/mtx.$$
376       rtn=$?
377       cat /tmp/mtx.$$ | grep "^Data Transfer Element 0:Full" | awk "{print
378 \$7}"
379       cat /tmp/mtx.$$ | grep "^Data Transfer Element 0:Empty" | awk "{print
380 0}"
381 #       cat /tmp/mtx.$$ | grep "^Data Transfer Element 1:Full" | awk "{print
382 \$7}"
383 #       cat /tmp/mtx.$$ | grep "^Data Transfer Element 1:Empty" | awk
384 "{print 0}"
385       rm -f /tmp/mtx.$$
386
387       echo "mtx-changer returning value: $rtn"
388       exit $rtn
389       ;;
390
391    slots)
392      echo "Request slots, DREW YOU HAVEN'T IMPLEMENTED YET!!!!"
393       ${MTX} -f $1 status | grep " *Storage Changer" | awk "{print \$5}"
394       rtn=$?
395       echo "mtx-changer returning value: $rtn"
396       ;;
397 esac
398
399
400 ****************************************************************************
401 **
402
403
404
405
406
407 Hope that helps. Sorry, it's kinda setup for our Adic, and for two drives. 
408
409
410
411 -Drew
412
413
414 -----Original Message-----
415 From: Terry [mailto:terry@mrtux.co.uk]
416 Sent: Wednesday, December 10, 2003 8:23 AM
417 To: bacula-users@lists.sourceforge.net
418 Subject: [Bacula-users] Re: Autochanger setup
419
420
421 bacula-users-request@lists.sourceforge.net wrote:
422
423 >Send Bacula-users mailing list submissions to
424 >       bacula-users@lists.sourceforge.net
425 >
426 >To subscribe or unsubscribe via the World Wide Web, visit
427 >       https://lists.sourceforge.net/lists/listinfo/bacula-users
428 >or, via email, send a message with subject or body 'help' to
429 >       bacula-users-request@lists.sourceforge.net
430 >
431 >You can reach the person managing the list at
432 >       bacula-users-admin@lists.sourceforge.net
433 >
434 >When replying, please edit your Subject line so it is more specific
435 >than "Re: Contents of Bacula-users digest..."
436 >
437 >
438 >Today's Topics:
439 >
440 >   1. Two beta releases (Kern Sibbald)
441 >   2. Re: Current Volume "Cinta-0006" not acceptable
442 >       because (Kern Sibbald)
443 >   3. Re: Jobs awaiting execution? (Kern Sibbald)
444 >   4. Re: Mount need for every job... me too (Gregory Brauer)
445 >   5. Importtant: BIG Problems with schedule / bacula doesn't do
446 Differnetial
447 >       backups (Volker Sauer)
448 >   6. Re: Mount need for every job... me too (fixed!) (Gregory Brauer)
449 >
450 >--__--__--
451 >
452 >Message: 1
453 >From: Kern Sibbald <kern@sibbald.com>
454 >To: bacula-announce <bacula-announce@lists.sourceforge.net>
455 >Cc: bacula-users <bacula-users@lists.sourceforge.net>
456 >Organization: 
457 >Date: 09 Dec 2003 22:11:47 +0100
458 >Subject: [Bacula-users] Two beta releases
459 >
460 >Hello,
461 >
462 >I have just made two Beta releases. Unfortunately, I mistakenly put the
463 >1.32e-08Dec03 Windows binaries in main win-binaries section rather than
464 >win-binaries-beta. At this point, I won't change it because it would
465 >require a new upload, ...
466 >
467 >The 1.33-08Dec03 release is definitely a Beta release in the sense that
468 >version 1.33 is still under very active development.  The main features
469 >of this release are: 
470 >- all features in 1.32e-08Dec03
471 >- update slots (marks any other Volumes in the same pool with the same
472 >  Slot number as "not InChanger"). This permits retaining the Slot on
473 >  Volumes not currently in the magazine.
474 >- update slots=<slot1>,<slot2>,<slot-range>, ...
475 >  where slot1, slot2 are slot numbers you want updated from barcode
476 >  information and slot-range is a slot-number1-slot-number2 (e.g. 3-5).
477 >- update slots[=...] scan
478 >  causes the Storage daemon to read the volume label for each slot 
479 >  listed, or in the absence of a slot list, all slots occupied.
480 >- Automatic synchronization of clocks between DIR and FD so that there
481 >  is no missed files due to timezone differences or shewed clocks.
482 >- A database upgrade is mandatory.
483 >- None of the daemons are compatible with version 1.32x, which means
484 >  you must upgrade all or nothing.
485 >- NOTE! FreeBSD users must add:
486 >   Two EOF = yes
487 >  to each of their tape Device resources in the SD. I forgot to document
488 >  this elsewhere!!!!!
489 >
490 >Release 1.32e-08Dec03 was meant to be an official 1.32e release with all
491 >the current patches and a few strategic updates from 1.33. In the end, I
492 >threw in *all* the updates from 1.33 except those that require a
493 >database upgrade or force a daemon incompatibility, or other operating
494 >incompatibility. 
495 >
496 >I haven't made 1.32-08Dec03 an official release for three reasons:
497 >- I cannot test it in production because my production system is on
498 >  release 1.33.
499 >- There is still a bit more documentation to do.
500 >- I added more of the 1.33 code than I originally planned, but some of
501 >  it such as the new 10 job history for each daemon is so neat that I
502 >  wanted to put it in your hands (one of the features not yet
503 >  documented).
504 >
505 >That said, I think this is a very good release. I have HEAVILY tested it
506 >with my regression testing, and 95% of the code has been running in my
507 >production 1.33 system since 24 November.  I encourage all of you to
508 >test it. Note, all of the daemons should be totally compatible with any
509 >other 1.32x release -- please send feedback.
510 >
511 >Once I finish the documentation and get some feedback on how it runs,
512 >I'll "officially" release it.
513 >
514 >As most of you know, from tomorrow morning, I will be out for one week
515 >and then a bit slow responding for a week or two. Thanks for all the
516 >well wishes I have received.
517 >
518 >Regards, Kern
519 >
520 >
521 >
522 >
523 >
524 >
525 >--__--__--
526 >
527 >Message: 2
528 >Subject: Re: [Bacula-users] Current Volume "Cinta-0006" not acceptable
529 >       because
530 >From: Kern Sibbald <kern@sibbald.com>
531 >To: Carlos Molina Molina <carlos_linux@hotmail.com>
532 >Cc: Phil Stracchino <alaric@caerllewys.net>,
533 >   bacula-users <bacula-users@lists.sourceforge.net>
534 >Organization: 
535 >Date: 09 Dec 2003 22:30:07 +0100
536 >
537 >
538 >--=-HANNTFvbGW9Q5KQ00dee
539 >Content-Type: text/plain; charset=ISO-8859-1
540 >Content-Transfer-Encoding: quoted-printable
541 >
542 >On Tue, 2003-12-09 at 19:03, Carlos Molina Molina wrote:
543 >  
544 >
545 >>no, I haven't the volume.... but the only thing that I need from bacula i=
546 >>    
547 >>
548 >t's=20
549 >  
550 >
551 >>that write in any volume
552 >>other thing it's that when finish it send this part of messages. I put "u=
553 >>    
554 >>
555 >se=20
556 >  
557 >
558 >>any volume"
559 >>=20
560 >>AZOG: Naboo-Backup.2003-12-09_14.12.07 Warning: Unexpected Client Job=20
561 >>message: 2801 End Backup Job TermCode=3D84 JobFiles=3D56064 ReadBytes=3D1=
562 >>    
563 >>
564 >501707569=20
565 >  
566 >
567 >>JobBytes=3D621946654
568 >>=20
569 >>AZOG: Naboo-Backup.2003-12-09_14.12.07 Fatal error: No Job status returne=
570 >>    
571 >>
572 >d=20
573 >  
574 >
575 >>from FD.
576 >>=20
577 >>What means???
578 >>    
579 >>
580 >
581 >I cannot comment on the tape Volume error messages, but the message
582 >listed above "Unexpected Client Job message ..." seems to me to come
583 >from the fact that you have upgraded that client (File daemon) to a more
584 >recent version of Bacula than you are running on your Director. Please
585 >check your version numbers. If they are both the same number they should
586 >work together. If not, you need to get them both on the same version.
587 >
588 >Be sure to read the ReleaseNotes on any upgrade to ensure you do any
589 >required database upgrading.
590 >
591 >Regards, Kern
592 >
593 >
594 >  
595 >
596 >>Thank
597 >>=20
598 >>    
599 >>
600 >>>From: Phil Stracchino <alaric@caerllewys.net>
601 >>>To: bacula-users@lists.sourceforge.net
602 >>>Subject: Re: [Bacula-users] Current Volume "Cinta-0006" not acceptable=20
603 >>>because
604 >>>Date: Tue, 9 Dec 2003 12:56:43 -0500
605 >>>
606 >>>On Tue, Dec 09, 2003 at 03:47:29PM +0000, Carlos Molina Molina wrote:
607 >>>      
608 >>>
609 >>>>How I avoid this message???, The only solution it's that I erase the=20
610 >>>>        
611 >>>>
612 >>>tape
613 >>>      
614 >>>
615 >>>>manually...
616 >>>>
617 >>>>
618 >>>>SDT-10000: Naboo-Backup.2003-12-09_12.38.04 Warning: mount.c:232=20
619 >>>>        
620 >>>>
621 >>>Director
622 >>>      
623 >>>
624 >>>>wanted Volume "Cinta-0001".
625 >>>>   Current Volume "Cinta-0006" not acceptable because:
626 >>>>   1997 Volume "Cinta-0006" not in catalog.
627 >>>>SDT-10000: Please mount Volume "Cinta-0001" on Storage Device=20
628 >>>>        
629 >>>>
630 >>>"SDT-10000"
631 >>>      
632 >>>
633 >>>>for Job Naboo-Backup.2003-12-09_12.38.04
634 >>>>Use "mount" command to release Job.
635 >>>>        
636 >>>>
637 >>>Don't you have the volume it's asking for?
638 >>>
639 >>>
640 >>>--
641 >>> .*********  Fight Back!  It may not be just YOUR life at risk. =20
642 >>>*********.
643 >>> : phil stracchino : unix ronin : renaissance man : mystic zen biker ge=
644 >>>      
645 >>>
646 >ek=20
647 >  
648 >
649 >>>:
650 >>> :  alaric@caerllewys.net : alaric-ruthven@earthlink.net : phil@latt.ne=
651 >>>      
652 >>>
653 >t =20
654 >  
655 >
656 >>>:
657 >>> :   2000 CBR929RR, 1991 VFR750F3 (foully murdered), 1986 VF500F (sold)=
658 >>>      
659 >>>
660 >  =20
661 >  
662 >
663 >>>:
664 >>> :    Linux Now!   ...Because friends don't let friends use Microsoft. =
665 >>>      
666 >>>
667 >  =20
668 >  
669 >
670 >>>:
671 >>>
672 >>>
673 >>>-------------------------------------------------------
674 >>>This SF.net email is sponsored by: SF.net Giveback Program.
675 >>>Does SourceForge.net help you be more productive?  Does it
676 >>>help you create better code?  SHARE THE LOVE, and help us help
677 >>>YOU!  Click Here: http://sourceforge.net/donate/
678 >>>_______________________________________________
679 >>>Bacula-users mailing list
680 >>>Bacula-users@lists.sourceforge.net
681 >>>https://lists.sourceforge.net/lists/listinfo/bacula-users
682 >>>      
683 >>>
684 >>=20
685 >>_________________________________________________________________
686 >>MSN Amor: busca tu =BD naranja http://latam.msn.com/amor/
687 >>=20
688 >>=20
689 >>=20
690 >>-------------------------------------------------------
691 >>This SF.net email is sponsored by: SF.net Giveback Program.
692 >>Does SourceForge.net help you be more productive?  Does it
693 >>help you create better code?  SHARE THE LOVE, and help us help
694 >>YOU!  Click Here: http://sourceforge.net/donate/
695 >>_______________________________________________
696 >>Bacula-users mailing list
697 >>Bacula-users@lists.sourceforge.net
698 >>https://lists.sourceforge.net/lists/listinfo/bacula-users
699 >>    
700 >>
701 >
702 >--=-HANNTFvbGW9Q5KQ00dee
703 >Content-Type: application/pgp-signature; name=signature.asc
704 >Content-Description: This is a digitally signed message part
705 >
706 >-----BEGIN PGP SIGNATURE-----
707 >Version: GnuPG v1.2.1 (GNU/Linux)
708 >
709 >iD8DBQA/1j7fNgfoSvWqwEgRAsEDAJ0aF6qvQVHiH0X4DCTwXQh3wux1gACfQLxl
710 >wKgzEjDQMg3v1vh4yS6kUys=
711 >=6xcc
712 >-----END PGP SIGNATURE-----
713 >
714 >--=-HANNTFvbGW9Q5KQ00dee--
715 >
716 >
717 >
718 >--__--__--
719 >
720 >Message: 3
721 >Subject: Re: [Bacula-users] Jobs awaiting execution?
722 >From: Kern Sibbald <kern@sibbald.com>
723 >To: Danie Theron <itsupport@raps.co.za>
724 >Cc: bacula-users <bacula-users@lists.sourceforge.net>
725 >Organization: 
726 >Date: 09 Dec 2003 22:39:39 +0100
727 >
728 >Hello,
729 >
730 >Move up to version 1.32d or 1.32e.  The job scheduler was totally
731 >rewritten between 1.31 and 1.32 and a number of bizarre little problems
732 >that some people (not me) were having totally went away. I suspect that
733 >they were pthreads related on non-Linux systems, but who knows ...
734 >
735 >Regards, Kern
736 >
737 >On Tue, 2003-12-09 at 12:09, Danie Theron wrote:
738 >  
739 >
740 >>Hi
741 >>
742 >>I have recently split my backups into more manageable sets , and now it
743 >>seems they are not running automatically. Here is an output when I do a
744 >>"status" command :
745 >>
746 >>Last Job BackupCatalog.2003-12-09_01.10.00 finished at 09-Dec-2003 01:10
747 >>  Files=1 Bytes=43,308,017 Termination Status=OK
748 >>Console connected at 09-Dec-2003 19:06
749 >>JobId 132 Job prometheus-rapstech.2003-12-09_19.00.03 is waiting
750 >>execution.
751 >>JobId 131 Job prometheus-consult-gis.2003-12-09_19.00.02 is waiting
752 >>execution.
753 >>JobId 130 Job prometheus-consult-documents.2003-12-09_19.00.01 is
754 >>waiting on max
755 >> Client jobs.
756 >>JobId 129 Job prometheus-system.2003-12-09_19.00.00 is running.
757 >>Level          Type     Scheduled          Name
758 >>=================================================================
759 >>Incremental    Backup   10-Dec-2003 19:00  prometheus-system
760 >>Incremental    Backup   10-Dec-2003 19:00  prometheus-consult-documents
761 >>Incremental    Backup   10-Dec-2003 19:00  prometheus-consult-gis
762 >>Incremental    Backup   10-Dec-2003 19:00  prometheus-rapstech
763 >>Full           Backup   10-Dec-2003 01:10  BackupCatalog
764 >>====
765 >>Connecting to Storage daemon File at localhost:9103
766 >>
767 >>prometheus-sd Version: 1.31a (02 Aug 2003)
768 >>Daemon started 08-Dec-2003 19:30, 3 Jobs run.
769 >>Last Job BackupCatalog.2003-12-09_01.10.00 finished at 09-Dec-2003 01:10
770 >>  Files=1 Bytes=43,308,119 Termination Status=OK
771 >>Device /data/server is mounted with Volume "backup"
772 >>    Total Bytes=791,751,921 Blocks=12,274 Bytes/block=64,506
773 >>    Positioned at File=0 Block=9,351
774 >>Device /data/server is not open.
775 >>Device /data/server is not open.
776 >>Device /data/server is not open.
777 >>Device /data/server is not open.
778 >>Full Backup job backup using Volume
779 >>"prometheus-system.2003-12-09_19.00.00" on d
780 >>evice /data/server
781 >>    Files=15,341 Bytes=602,255,638 Bytes/sec=1,517,016
782 >>    FDReadSeqNo=134,036 in_msg=96746 out_msg=5 fd=6
783 >>
784 >>
785 >>When I manually run a job it backups fine.
786 >>
787 >>Ta in advance
788 >>Daniel
789 >>
790 >>
791 >>
792 >>-------------------------------------------------------
793 >>This SF.net email is sponsored by: SF.net Giveback Program.
794 >>Does SourceForge.net help you be more productive?  Does it
795 >>help you create better code?  SHARE THE LOVE, and help us help
796 >>YOU!  Click Here: http://sourceforge.net/donate/
797 >>_______________________________________________
798 >>Bacula-users mailing list
799 >>Bacula-users@lists.sourceforge.net
800 >>https://lists.sourceforge.net/lists/listinfo/bacula-users
801 >>    
802 >>
803 >
804 >
805 >
806 >--__--__--
807 >
808 >Message: 4
809 >Date: Tue, 09 Dec 2003 14:57:32 -0800
810 >From: Gregory Brauer <greg@wildbrain.com>
811 >To: bacula-users <bacula-users@lists.sourceforge.net>
812 >Subject: Re: [Bacula-users] Mount need for every job... me too
813 >
814 >
815 >I have looked at all of the comments in this thread, but I
816 >am also having this problem and cannot seem to fix it.
817 >I am using an autochanger that blocks waiting for me to type
818 >the "mount" command every time it autoloads a tape.  It
819 >worked fine for me with 1.31, but has been doing this
820 >since I upgraded to 1.32d.  Here are some excerpts from my
821 >configuration:
822 >
823 >
824 > From bacula-dir.conf:
825 >
826 >Storage {
827 >   Autochanger = yes
828 >   Name = "kiev AIT2 Autoloader"
829 >   Address = kiev
830 >   SDPort = 9103
831 >   Password = "yV3C5gZXhF/RrYadlwKWnwAbTV1oUCXVqUIrAaUjMov+"
832 >   Device = "AIT2 Autoloader"
833 >   MediaType = "AIT2"
834 >}
835 >
836 >
837 > From bacula-sd.conf:
838 >
839 >Device {
840 >   Autochanger = yes
841 >   Changer Device = /dev/sg0
842 >   Changer Command = "/etc/bacula/mtx-changer %c %o %S %a"
843 >   Name = "AIT2 Autoloader"
844 >   Media Type = "AIT2"
845 >   Archive Device = /dev/nst0
846 >   Hardware end of medium = No;
847 >   Automatic Mount = yes;
848 >   Always Open = yes;
849 >   Removable Media = yes;
850 >}
851 >
852 >I had tried this with both Always Open = yes, and no... it worked fine
853 >with "no" under 1.31.
854 >
855 >
856 >I have also noticed that every time bacula issues a "load slot" command,
857 >I get an error message saying mtx-changer exited 1.
858 >
859 >
860 >09-Dec-2003 14:42 kiev-sd: 3303 Issuing autochanger "load slot 15" command.
861 >09-Dec-2003 14:44 kiev-sd: 3992 Bad autochanger "load slot" status=1.
862 >
863 >
864 >But if I run mtx-changer manually from the command line, it always
865 >seems to exit 0, so I'm not sure where bacula is seeing this error.
866 >
867 >
868 >basic [root@kiev bacula]$ ./mtx-changer /dev/sg0 load 15 /dev/nst0
869 >basic [root@kiev bacula]$ echo $status
870 >0
871 >
872 >
873 >I have tried increasing my sleep time on load to arbitrarily high
874 >values, but that hasn't helped.
875 >
876 >
877 >    load)
878 >#     echo "Doing mtx -f $1 load $3"
879 >       ${MTX} -f $1 load $3
880 >       rtn=$?
881 >#
882 ># Increase the sleep time if you have a slow device
883 >       #sleep 15
884 >       sleep 120
885 >       exit $rtn
886 >       ;;
887 >
888 >
889 >What else can I check?
890 >
891 >Greg
892 >
893 >
894 >
895 >--__--__--
896 >
897 >Message: 5
898 >Date: Wed, 10 Dec 2003 00:48:19 +0100
899 >From: Volker Sauer <volker@volker-sauer.de>
900 >To: Kern Sibbald <kern@sibbald.com>,
901 >   bacula-users <bacula-users@lists.sourceforge.net>
902 >Subject: [Bacula-users] Importtant: BIG Problems with schedule / bacula
903 doesn't do Differnetial
904 > backups
905 >
906 >This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
907 >--------------enig1AEBD91EBCB59C2EB43FEF98
908 >Content-Type: text/plain; charset=us-ascii; format=flowed
909 >Content-Transfer-Encoding: 7bit
910 >
911 >Hallo Kern,
912 >
913 >as I already worried about in 2 other mails is now proven:
914 >
915 >Bacula doesn't do a diffential backup!
916 >
917 >My schedule is this:
918 >
919 >Schedule {
920 >         Name = "WeeklyCycle"
921 >         Run = Level=Full Pool=Full 1st tue at 2:00pm
922 >         Run = Level=Differential Pool=Full 2nd-5th tue at 7:00pm
923 >         Run = Level=Incremental Pool=Inc wed-mon at 7:00pm
924 >}
925 >
926 >
927 >and this is what list jobs says (I hope you can read that):
928 >
929 >
930 >|    55 | Zaphod                | 2003-12-02 14:00:04 | B    | F     | 
931 >504,634 | 20,669,282,940 | T         |
932 >|    56 | Arthur                | 2003-12-02 16:31:30 | B    | F     | 
933 >380,719 | 15,498,385,751 | T         |
934 >|    57 | Alexis                | 2003-12-02 18:23:45 | B    | F     | 
935 >167,710 |  5,157,651,432 | T         |
936 >|    58 | BackupCatalog         | 2003-12-02 19:23:13 | B    | F     | 
937 >       1 |    404,663,640 | T         |
938 >|    59 | ReminderIncCartridge  | 2003-12-03 08:00:05 | D    | F     | 
939 >       0 |              0 | T         |
940 >|    60 | Zaphod                | 2003-12-03 19:00:04 | B    | I     | 
941 >     693 |    262,166,208 | T         |
942 >|    61 | Arthur                | 2003-12-03 19:12:57 | B    | I     | 
943 >     314 |    889,290,521 | T         |
944 >|    62 | Alexis                | 2003-12-03 19:24:46 | B    | I     | 
945 >     748 |     56,013,471 | T         |
946 >|    63 | BackupCatalog         | 2003-12-03 22:00:04 | B    | F     | 
947 >       1 |    404,846,132 | T         |
948 >|    64 | Zaphod                | 2003-12-04 19:00:05 | B    | I     | 
949 >     740 |    385,140,941 | T         |
950 >|    65 | Arthur                | 2003-12-04 19:16:03 | B    | I     | 
951 >     441 |    904,698,439 | T         |
952 >|    66 | Alexis                | 2003-12-04 19:28:09 | B    | I     | 
953 >     669 |     68,876,161 | T         |
954 >|    67 | BackupCatalog         | 2003-12-04 22:00:04 | B    | F     | 
955 >       1 |    253,231,104 | E         |
956 >|    68 | BackupCatalog         | 0000-00-00 00:00:00 | B    | I     | 
957 >       0 |              0 | C         |
958 >|    69 | BackupCatalog         | 0000-00-00 00:00:00 | B    | I     | 
959 >       0 |              0 | C         |
960 >|    70 | BackupCatalog         | 2003-12-05 01:25:19 | B    | I     | 
961 >       1 |    405,045,253 | T         |
962 >|    71 | Zaphod                | 2003-12-05 19:00:04 | B    | I     | 
963 >   8,389 |    373,643,708 | T         |
964 >|    72 | Arthur                | 2003-12-05 19:13:59 | B    | I     | 
965 >   6,904 |  1,007,785,097 | T         |
966 >|    73 | Alexis                | 2003-12-05 19:28:23 | B    | I     | 
967 >   4,085 |    114,727,583 | T         |
968 >|    74 | BackupCatalog         | 2003-12-05 22:00:04 | B    | F     | 
969 >       1 |    407,222,289 | T         |
970 >|    75 | Zaphod                | 2003-12-06 19:00:05 | B    | I     | 
971 >     923 |    175,466,045 | T         |
972 >|    76 | Arthur                | 2003-12-06 19:14:01 | B    | I     | 
973 >   1,872 |    516,372,637 | T         |
974 >|    77 | Alexis                | 2003-12-06 19:25:01 | B    | I     | 
975 >   5,422 |    190,847,977 | T         |
976 >|    78 | BackupCatalog         | 2003-12-06 22:00:04 | B    | F     | 
977 >       1 |    408,121,544 | T         |
978 >|    79 | Zaphod                | 2003-12-07 19:00:04 | B    | I     | 
979 >   1,347 |     93,787,356 | T         |
980 >|    80 | Arthur                | 2003-12-07 19:12:06 | B    | I     | 
981 >     705 |    496,647,729 | T         |
982 >|    81 | Alexis                | 2003-12-07 19:25:08 | B    | I     | 
983 >   1,414 |    102,756,100 | T         |
984 >|    82 | BackupCatalog         | 2003-12-07 22:00:04 | B    | F     | 
985 >       1 |    408,519,580 | T         |
986 >|    83 | Zaphod                | 2003-12-08 19:00:05 | B    | I     | 
987 >   4,428 |    461,132,237 | T         |
988 >|    84 | Arthur                | 2003-12-08 19:15:59 | B    | I     | 
989 >     307 |    384,713,540 | T         |
990 >|    85 | Alexis                | 2003-12-08 19:25:56 | B    | I     | 
991 >     708 |     78,420,311 | T         |
992 >|    86 | BackupCatalog         | 2003-12-08 22:00:04 | B    | F     | 
993 >       1 |    409,139,688 | T         |
994 >|    87 | ReminderFullCartridge | 2003-12-09 06:00:05 | D    | F     | 
995 >       0 |              0 | T         |
996 >|    88 | Zaphod                | 2003-12-09 19:00:05 | B    | F     | 
997 >507,058 | 21,050,750,780 | T         |
998 >|    89 | Arthur                | 2003-12-09 21:27:07 | B    | F     | 
999 >382,397 | 15,246,847,324 | T         |
1000 >|    90 | Alexis                | 2003-12-09 23:18:30 | B    | F     | 
1001 >167,868 |  4,595,334,742 | T         |
1002 >|    91 | BackupCatalog         | 2003-12-10 00:10:05 | B    | F     | 
1003 >       1 |    528,055,685 | T         |
1004 >+-------+-----------------------+---------------------+------+-------+-----
1005 -----+----------------+-----------+
1006 >*
1007 >
1008 >Bacula did a FullBackup on December 2nd, which was the first Tuesday in 
1009 >this month. Correct. Then it did Incremenatial backups from 3rd until 
1010 >8th. Also correct.
1011 >Yesterday, on December 9th - according to my schedule there should have 
1012 >been a differential backup!! But as you can see above, bacula did a Full 
1013 >backup - without reason, I think!!
1014 >(This brings real big problems to my storage managment, because I don't 
1015 >have enough space for 4 Full-Backups a month. I urgently need diffential 
1016 >backups in the conecept)
1017 >Could the cause be, that there's a pool change! Should the diffential 
1018 >backup better go to the inc-pool??
1019 >
1020 >Please help!!
1021 >
1022 >Regards
1023 >Volker
1024 >
1025 >P.S.: this is the job output of the jobs from Tue 9th, which should have 
1026 >been differential:
1027 >
1028 >
1029 >z217-dir: Start Backup JobId 88, Job=Zaphod.2003-12-09_19.00.00
1030 >z217-sd: 3301 Issuing autochanger "loaded" command.
1031 >z217-sd: Volume "F-6" previously written, moving to end of data.
1032 >z217-sd: Ready to append to end of Volume at file=6.
1033 >z217-sd: block.c:480 End of medium on device /dev/tape. Write of 64512 
1034 >bytes got 32768.
1035 >z217-sd: End of medium on Volume "F-6" Bytes=23,935,131,136 
1036 >Blocks=371,020 at 09-Dec-2003 21:06.
1037 >z217-sd: 3301 Issuing autochanger "loaded" command.
1038 >z217-sd: 3302 Issuing autochanger "unload" command.
1039 >z217-sd: 3303 Issuing autochanger "load slot 7" command.
1040 >z217-sd: 3304 Autochanger "load slot 7" status is OK.
1041 >z217-sd: Wrote label to prelabeled Volume "F-7" on device /dev/tape
1042 >z217-sd: New volume "F-7" mounted on device /dev/tape at 09-Dec-2003 21:08.
1043 >z217-dir: Bacula 1.32d (02Nov03): 09-Dec-2003 21:27
1044 >JobId:                  88
1045 >Job:                    Zaphod.2003-12-09_19.00.00
1046 >Backup Level:           Full
1047 >Client:                 zaphod-fd
1048 >FileSet:                "Set Zaphod" 2003-11-21 16:32:26
1049 >Start time:             09-Dec-2003 19:00
1050 >End time:               09-Dec-2003 21:27
1051 >FD Files Written:       507,058
1052 >SD Files Written:       507,058
1053 >FD Bytes Written:       21,050,750,780
1054 >SD Bytes Written:       21,121,287,812
1055 >Rate:                   2387.2 KB/s
1056 >Software Compression:   None
1057 >Volume name(s):         F-6|F-7
1058 >Volume Session Id:      14
1059 >Volume Session Time:    1070650983
1060 >Last Volume Bytes:      2,327,668,804
1061 >Non-fatal FD errors:    0
1062 >SD Errors:              0
1063 >FD termination status:  OK
1064 >SD termination status:  OK
1065 >Termination:            Backup OK
1066 >
1067 >z217-dir: Begin pruning Jobs.
1068 >z217-dir: No Jobs found to prune.
1069 >z217-dir: Begin pruning Files.
1070 >z217-dir: No Files found to prune.
1071 >z217-dir: End auto prune.
1072 >
1073 >
1074 >
1075 >z217-dir: Start Backup JobId 89, Job=Arthur.2003-12-09_19.00.01
1076 >z217-dir: Bacula 1.32d (02Nov03): 09-Dec-2003 23:18
1077 >JobId:                  89
1078 >Job:                    Arthur.2003-12-09_19.00.01
1079 >Backup Level:           Full
1080 >Client:                 z217-fd
1081 >FileSet:                "Set Arthur" 2003-11-21 18:47:14
1082 >Start time:             09-Dec-2003 21:27
1083 >End time:               09-Dec-2003 23:18
1084 >FD Files Written:       382,397
1085 >SD Files Written:       382,397
1086 >FD Bytes Written:       15,246,847,324
1087 >SD Bytes Written:       15,300,937,041
1088 >Rate:                   2283.1 KB/s
1089 >Software Compression:   None
1090 >Volume name(s):         F-7
1091 >Volume Session Id:      15
1092 >Volume Session Time:    1070650983
1093 >Last Volume Bytes:      17,654,556,715
1094 >Non-fatal FD errors:    0
1095 >SD Errors:              0
1096 >FD termination status:  OK
1097 >SD termination status:  OK
1098 >Termination:            Backup OK
1099 >
1100 >z217-dir: Begin pruning Jobs.
1101 >z217-dir: No Jobs found to prune.
1102 >z217-dir: Begin pruning Files.
1103 >z217-dir: No Files found to prune.
1104 >z217-dir: End auto prune.
1105 >
1106 >
1107 >
1108 >z217-dir: Start Backup JobId 90, Job=Alexis.2003-12-09_19.00.02
1109 >z217-dir: Bacula 1.32d (02Nov03): 10-Dec-2003 00:10
1110 >JobId:                  90
1111 >Job:                    Alexis.2003-12-09_19.00.02
1112 >Backup Level:           Full
1113 >Client:                 alexis-fd
1114 >FileSet:                "Set Alexis" 2003-11-21 20:58:58
1115 >Start time:             09-Dec-2003 23:18
1116 >End time:               10-Dec-2003 00:10
1117 >FD Files Written:       167,868
1118 >SD Files Written:       167,868
1119 >FD Bytes Written:       4,595,334,742
1120 >SD Bytes Written:       4,616,435,343
1121 >Rate:                   1487.2 KB/s
1122 >Software Compression:   None
1123 >Volume name(s):         F-7
1124 >Volume Session Id:      16
1125 >Volume Session Time:    1070650983
1126 >Last Volume Bytes:      22,280,313,500
1127 >Non-fatal FD errors:    0
1128 >SD Errors:              0
1129 >FD termination status:  OK
1130 >SD termination status:  OK
1131 >Termination:            Backup OK
1132 >
1133 >z217-dir: Begin pruning Jobs.
1134 >z217-dir: No Jobs found to prune.
1135 >z217-dir: Begin pruning Files.
1136 >z217-dir: No Files found to prune.
1137 >z217-dir: End auto prune.
1138 >  
1139 >
1140 I'm trying to setup a surestore 12000e autochanger so far in my 
1141 bacula-sd.conf  i have added this
1142 Device {
1143   Name = autochanger                     #
1144   Media Type = DDS-2
1145   Archive Device = /dev/sa1
1146   AutomaticMount = yes;               # when device opened, read it
1147   AlwaysOpen = yes;
1148   LabelMedia = yes;
1149   RemovableMedia = yes;
1150   Autochanger = yes;
1151   Changer Device = /dev/pass0 #changer device
1152 }
1153 But i need to make an entry for the Changer Command =   .I have 
1154 installed mtx but there are no sample files to be found or any
1155 bacula samples for autochangers
1156 Cheers Terry
1157
1158
1159
1160
1161 -------------------------------------------------------
1162 This SF.net email is sponsored by: SF.net Giveback Program.
1163 Does SourceForge.net help you be more productive?  Does it
1164 help you create better code?  SHARE THE LOVE, and help us help
1165 YOU!  Click Here: http://sourceforge.net/donate/
1166 _______________________________________________
1167 Bacula-users mailing list
1168 Bacula-users@lists.sourceforge.net
1169 https://lists.sourceforge.net/lists/listinfo/bacula-users
1170
1171
1172 -------------------------------------------------------
1173 This SF.net email is sponsored by: SF.net Giveback Program.
1174 Does SourceForge.net help you be more productive?  Does it
1175 help you create better code?  SHARE THE LOVE, and help us help
1176 YOU!  Click Here: http://sourceforge.net/donate/
1177 _______________________________________________
1178 Bacula-users mailing list
1179 Bacula-users@lists.sourceforge.net
1180 https://lists.sourceforge.net/lists/listinfo/bacula-users