Bacula-users

Re: [Bacula-users] wrong SD device displayed

2008-11-25 04:33:43
Subject: Re: [Bacula-users] wrong SD device displayed
From: Arno Lehmann <al AT its-lehmann DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 25 Nov 2008 10:31:15 +0100
Hi,

23.11.2008 03:21, Maxime wrote:
> Hello,
> 
> Recently I had to restore data from purged volumes that hadn't been 
> recycled hopefully. It's files on hard drives.
> I rebuild the catalog with bscan.
> And I launch restoration jobs.
> 
> In bacula-sd.conf, we can find :
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> Device {
>    Name = FileStorage1
>    Media Type = File
>    Archive Device = /bacula/disk01/
> 
>    LabelMedia = yes;               # lets Bacula label unlabeled media
>    Random Access = Yes;
>    AutomaticMount = yes;           # when device opened, read it
>    RemovableMedia = no;
>    AlwaysOpen = no;
> }
>  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> and in bacula-dir.conf
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> Storage {
>    Name = backup01c-sd
>    Address = backup01c.univ-avignon.fr
>    SDPort = 9103
>    Password = "xxxxxxxxx"
>    Device = FileStorage1
>    Media Type = File
> 
> TLS Enable = yes
> TLS Require = yes
> ...
> }
>  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> 
> There is also FileStorage2 defined with /bacula/disk02/ partition 
> (Storage backup01c-sd2).
> *All my old volumes are located on /bacula/disk02/*, but just before 
> launching restore job, I could read :
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> The job will require the following
>     Volume(s)                 Storage(s)                SD Device(s)
> ===========================================================================
> 
>     Full-0113                 backup01c-sd2             FileStorage2 
> 
>     Inc-0263                  backup01c-sd              FileStorage1 
> 
>     Inc-0373                  backup01c-sd              FileStorage1 
> 
>     Inc-0406                  backup01c-sd              FileStorage1 
> 
>     Inc-0412                  backup01c-sd              FileStorage1 
> 
>     Inc-0466                  backup01c-sd2             FileStorage2 
> 
>     Inc-0486                  backup01c-sd2             FileStorage2 
> 
>     Inc-0546                  backup01c-sd2             FileStorage2 
> 
>     Inc-0566                  backup01c-sd2             FileStorage2 
> 
>     Inc-0072                  backup01c-sd2             FileStorage2 
> 
>  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Hmm... restoring from two storage devices is not expected to work 
without manual intervention. You might have to separate the bootstrap 
file manually, so that you can run a number of jobs each using only 
one storage device.

For disk based volumes, it might be easier (temporarily) assigning the 
volumes to one common pool and soft-link them to a common directory, 
i.e. storage device.

> But all volumes had been read from /bacula/disk02/ since job report 
> displays :
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> 22-Nov 18:35 backup01c-sd JobId 2924: Ready to read from volume 
> "Inc-0263" on device "FileStorage2" (/bacula/disk02/).
> 22-Nov 18:36 backup01c-sd JobId 2924: End of Volume at file 2 on device 
> "FileStorage2" (/bacula/disk02/), Volume "Inc-0263"
> 22-Nov 18:36 backup01c-sd JobId 2924: Ready to read from volume 
> "Inc-0373" on device "FileStorage2" (/bacula/disk02/).
> 22-Nov 18:36 backup01c-sd JobId 2924: End of Volume at file 0 on device 
> "FileStorage2" (/bacula/disk02/), Volume "Inc-0373"
> 22-Nov 18:36 backup01c-sd JobId 2924: Ready to read from volume 
> "Inc-0406" on device "FileStorage2" (/bacula/disk02/).
> 22-Nov 18:37 backup01c-sd JobId 2924: End of Volume at file 2 on device 
> "FileStorage2" (/bacula/disk02/), Volume "Inc-0406"
> 22-Nov 18:37 backup01c-sd JobId 2924: Ready to read from volume 
> "Inc-0412" on device "FileStorage2" (/bacula/disk02/).
> 22-Nov 18:39 backup01c-sd JobId 2924: End of Volume at file 2 on device 
> "FileStorage2" (/bacula/disk02/), Volume "Inc-0412"
>  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> 
> I think bacula is confused because there are non purged volumes named 
> Inc-0263, Inc-0373, Inc-0406, and Inc-0412 on FileStorage1 :
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> *list volume=Inc-0406
> +---------+------------+-----------+---------+---------------+----------+--------------+---------+------+-----------+-----------+---------------------+
> | MediaId | VolumeName | VolStatus | Enabled | VolBytes      | VolFiles 
> | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten 
>        |
> +---------+------------+-----------+---------+---------------+----------+--------------+---------+------+-----------+-----------+---------------------+
> |     406 | Inc-0406   | Used      |       1 | 9,337,460,938 |        0 
> |    2,592,000 |       1 |    0 |         0 | File      | 2008-10-21 
> 08:27:27 |
> +---------+------------+-----------+---------+---------------+----------+--------------+---------+------+-----------+-----------+---------------------+
> *list volumes jobid=2542
> Jobid 2542 used 1 Volume(s): Inc-0406
> +-------+------------+---------------------+------+-------+----------+-------------+-----------+
> | JobId | Name       | StartTime           | Type | Level | JobFiles | 
> JobBytes    | JobStatus |
> +-------+------------+---------------------+------+-------+----------+-------------+-----------+
> | 2,542 | job_web01c | 2008-11-04 01:48:10 | B    | I     |    2,982 | 
> 559,944,881 | T         |
> +-------+------------+---------------------+------+-------+----------+-------------+-----------+
>  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> Dates don't match...
> 
> 
> What brings me to the points :
> 1) There are purged volumes on a partition (storage device) and non 
> purged volumes identically named on the other partition. Is my bacula 
> configuration weird or is it a normal state?

If you've got two volumes with the same name that is definitely a problem.

If those volumes have different IDs in the catalog, you /only/ have a 
user interface problem :-)

If the volumes represent different historical snapshots of the same 
volume you'd better use bextract to specify which files to use.

bscanning old states of volumes into the catalog will surely scre up 
your catalog as that will override the current inventory of things on 
those volumes.

> 2) If everything is fine, bacula console shouldn't have displayed it 
> will use volumes from backup01c-sd FileStorage1. So is it a bug?

Hardly. I rather suggest to use bextract to get the files you need... 
setting volumes to an older state and expecting Bacula to correctly 
handle two versions of the same volume is probably a bit too much :-)

Arno

> Thanks for your comments
> --
> Maxime CHARPENNE
> Université d'Avignon et des Pays de Vaucluse - CRI
> Tél. : +33 4 90 16 26 05
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users

-- 
Arno Lehmann
IT-Service Lehmann
Sandstr. 6, 49080 Osnabrück
www.its-lehmann.de

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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>