Ana: what are you using to quickly test these configurations? I suspect a VM or similar.
You're welcome. Yes, I have VMs for testing purposes :).
I run tests with exactly your configuration and had the same issue. The drive index 0 must exist and belongs to the autochanger resource. You have an Index 0 drive in your configuration: vRestore. But it is not in the Autochanger definition. If you put it there, it will work:
I tried defining the vRestore drive with "autoselect = no" (this work for physical autochangers). But it seems to make no sense when dealing with virtual disk autochangers.
Do we need vRestore in there? Instead, I renumbered my Drive Index fields from zero.
No, I just added it to the device list because vRestore was configured as an autochanger drive with index 0. I think your solution is better, since we cannot select a specific drive for restores in the case of virtual autochangers.
Having a single drive for restores worked for me. I was able to restore files from jobs/volumes that used the autochanger for backup.
Device {
Name = Restore
-Drive
Media Type = File
Archive Device = /usr/local/bacula/volumes
LabelMedia = yes
Random Access = yes
AutomaticMount = yes
RemovableMedia = yes
AlwaysOpen = yes
}
I have this in my bacula-sd.conf:
Device {
Name = Restore-Drive
Media Type = File
Archive Device = /usr/local/bacula/volumes
LabelMedia = yes
Random Access = yes
AutomaticMount = yes
RemovableMedia = no
AlwaysOpen = no
Maximum Concurrent Jobs = 1
Volume Poll Interval = 15
}
When I run a restore job, it selects vDrive-1 automatically.
Yes, if you select the virtual autochanger storage for restore, the drive index 0 will be selected for the restore.
How did you get the restore to use Restore-Drive?
I configured the Restore-Drive as a storage in bacula-dir.conf (both Restore-Drive and VirtualDisk drives configured with the same archive device). This way we can choose the Restore-Drive for restoring files that are in volumes in the same mount point as the virtual autochanger.
> On Aug 25, 2015, at 5:13 PM, Heitor Faria <heitor AT bacula.com DOT br> wrote:
>
>>> Dan,
>>>
>>> At a glance I think you must have a "Drive Index=0" at the universe of drives of
>>> your autochanger.
>>>
>>> "Device = vDrive-1, vDrive-2, vDrive-3, vDrive-4, vDrive-5"
>>
>> I never considered that I needed to start indexing my drives from zero. Hmm.
>> Thank you. I will look into that.
>
> It is just a wild shot from a non-developer.
Do not undervalue that. :)
> But with some user perception of C plus Kern's elegant and merciless coding I think it would worth a try. =P
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140