Hello Dan,
Heitor is right :)
Thank you.
Ana: what are you using to quickly test these configurations? I suspect a VM or similar.
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:
|
Autochanger { |
| Name = VirtualDisk |
|
|
| Changer Device = /dev/null |
| Changer Command = /dev/null |
|
|
| Device = vRestore, vDrive-1, vDrive-2, vDrive-3, vDrive-4, vDrive-5 |
| } |
|
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.
Autochanger {
Name = VirtualDisk
Changer Device = /dev/null
Changer Command = /dev/null
Device = vDrive-1, vDrive-2, vDrive-3, vDrive-4, vDrive-5
}
Device {
Name = vDrive-1
Media Type = File
Archive Device = /usr/local/bacula/volumes
LabelMedia = yes
Random Access = yes
AutomaticMount = yes
RemovableMedia = no
AlwaysOpen = no
Autochanger = yes
Drive Index = 0
Maximum Concurrent Jobs = 1
Volume Poll Interval = 15
}
Device {
Name = vDrive-2
...same as above
Autochanger = yes
Drive Index = 1
Maximum Concurrent Jobs = 1
Volume Poll Interval = 15
}
Device {
Name = vDrive-3
...same as above
Autochanger = yes
Drive Index = 2
Maximum Concurrent Jobs = 1
Volume Poll Interval = 15
}
Device {
Name = vDrive-4
...same as above
Autochanger = yes
Drive Index = 3
Maximum Concurrent Jobs = 1
Volume Poll Interval = 15
}
Device {
Name = vDrive-5
...same as above
Autochanger = yes
Drive Index = 4
Maximum Concurrent Jobs = 25
Volume Poll Interval = 15
}
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.
How did you get the restore to use Restore-Drive?