Bacula-users

Re: [Bacula-users] vchanger configuration question

2009-10-27 09:51:57
Subject: Re: [Bacula-users] vchanger configuration question
From: Josh Fisher <jfisher AT pvct DOT com>
To: scourtney AT sinenomine DOT net
Date: Tue, 27 Oct 2009 09:36:16 -0400
You don't have 'Autochanger = yes' in the device records for d1, d2, and d3.

That howto (and script) are outdated and need to be edited. The vchanger 
project page is at http://sourceforge.net/projects/vchanger/, and there 
is a much more recent howto there.

Scott Courtney wrote:
> Greetings, all
>
> I'm brand-new to Bacula, and am trying to set up vchanger.sh using the
> documentation at http://wiki.bacula.org/doku.php?id=removable_disk in
> combination with the Bacula manuals. I'm running version 2.4 of Bacula
> itself, and the back end is MySQL 5.1.x.
>
> In production, this setup will use multiple USB disk drives, but for
> testing I am using three logical volumes called d1, d2, and d3 to
> represent my "daily" USB drive set.
>
> I have created /etc/bacula/changer-usb-daily.conf with contents as
> follows:
>
> baculasd="changer-usb-daily"
> baculasd_user=bacula
> bconsole=/usr/bin/bconsole
> magslots=20
> maxdrive=2
> mountpoint=/home/bacula/daily
> statedir=/var/bacula/changer-usb-daily
>
> One of the logical volumes is currently mounted at /home/bacula/daily to
> simulate a USB drive having been mounted there by autofs. An "ls -l" of
> that volume shows the following:
>
> -rw-r----- 1 bacula bacula     2 2009-10-26 18:42 index
> drwx------ 2 root   root   12288 2009-10-26 17:42 lost+found
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s001
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s002
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s003
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s004
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s005
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s006
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s007
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s008
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s009
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s010
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s011
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s012
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s013
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s014
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s015
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s016
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s017
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s018
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s019
> -rw-r--r-- 1 bacula bacula     0 2009-10-26 18:42 m02s020
>
> In my /etc/bacula/bacula-sd.conf file, I have this section:
>
> # Virtual changer for daily backups
> Autochanger {
>         Name = changer-usb-daily
>         Device = d1
>         Device = d2
>         Device = d3
>         Changer Command = "/etc/bacula/vchanger %c %o %S %a %d"
>         Changer Device = "/etc/bacula/changer-usb-daily.conf"
> }
> Device {
>   Name = d1
>   Media Type = File
>   Device Type = File
>   Archive Device = /home/bacula/d1
>   LabelMedia = yes;                   # lets Bacula label unlabeled
> media
>   RandomAccess = Yes;
>   AutomaticMount = yes;               # when device opened, read it
>   RemovableMedia = no;
>   AlwaysOpen = no;
>   DriveIndex = 0
> }
> Device {
>   Name = d2
>   Media Type = File
>   Device Type = File
>   Archive Device = /home/bacula/d2
>   LabelMedia = yes;                   # lets Bacula label unlabeled
> media
>   RandomAccess = Yes;
>   AutomaticMount = yes;               # when device opened, read it
>   RemovableMedia = no;
>   AlwaysOpen = no;
>   DriveIndex = 1
> }
> Device {
>   Name = d3
>   Media Type = File
>   Device Type = File
>   Archive Device = /home/bacula/d3
>   LabelMedia = yes;                   # lets Bacula label unlabeled
> media
>   RandomAccess = Yes;
>   AutomaticMount = yes;               # when device opened, read it
>   RemovableMedia = no;
>   AlwaysOpen = no;
>   DriveIndex = 2
> }
>
>
> Finally, in /etc/bacula/bacula-dir.conf I have this:
>
> # A test daily job
> Job {
>         Name = "daily"
>         Type = Backup
>         Level = Incremental
>         Client = marcus-fd
>         FileSet = "etc"
>         Storage = storage-daily
>         Messages = Standard
>         Pool = daily
>         Priority = 10
> }
> # For testing
> FileSet {
>         Name = "etc"
>         Include {
>                 Options {
>                         signature = MD5
>                 }
>                 File = /etc
>         }
> }
> Storage {
>         Name = storage-daily
>         Address = marcus 
>         SDPort = 9103
>         Password = "1C-tT2Ql6DGOQ0OG-t1RDtkL6LKWVb9CD"
>         Device = changer-usb-daily
>         Media Type = File
>         Autochanger = yes
> }
> # Daily pool
> Pool {
>         Name = daily
>         Pool Type = backup
>         Recycle = yes
>         AutoPrune = yes
>         Volume Retention = 30 days
>         Volume Use Duration = 2 min
> }
>
>
> The short value for "volume use duration" is for testing.
>
> When I try to run "label barcodes" as directed in the HOWTO, the Bacula
> console responds with this:
>
> *label barcodes
> The defined Storage resources are:
>      1: File
>      2: storage-daily
> Select Storage resource (1-2): 2
> Connecting to Storage daemon storage-daily at marcus:9103 ...
> 3993 Device "d1" (/home/bacula/d1) not an autochanger device.
> Device "changer-usb-daily" has 0 slots.
> No slots in changer to scan.
>
>
>
> I'm not sure why it's trying to get to /home/bacula/d1 rather than using
> the vchanger.sh script.
>
> What is particularly confusing to me is the distinction between the
> mount point in the vchanger config file, and the three device
> definitions in bacula-sd.conf. Originally I thought I should mount my
> three logical volumes at /home/bacula/d1 through d3, respectively, but
> then saw that a single mount point was all that could be specified in
> the vchanger config.
>
> The vchanger doc is written from the perspective of a single drive being
> online at a time, whereas I will have three devices online at once and
> need the system to rotate round-robin through them each night for the
> daily incrementals (I will have a separate device for a weekly full
> backup, but that's a different configuration problem).
>
> I get the feeling I'm pretty close to a working configuration here, but
> have misstepped in one place. I'm just not sure *where* I goofed. I
> would appreciate any suggestions of what to look at next.
>
> Thanks, and kind regards,
>
> Scott
>
>   

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>