Hello @icabrillo,
Welcome to the Bacularis User Group.
The Storage
directive in the Bacula restore job is possible to configure but it is not taken into account it the restore process. It is there for compatibility with the general Job
resource schema that allows to configure Storage
. The same as the Pool
directive that is not taken into account in the restore but it is possible to configure in the Restore
job type.
When the restore is preparing, Bacula Director uses jobmedia
SQL table to know what volumes will be required to restore. Once the Bacula Director knows volumes, it knows what Storage
labeled this volume and it knows the MediaType
.
There is a case when you can determine the Storage
used for restore. This is the storage=xxxx
parameter in the restore
Bconsole command (or by 'mod' in restore in bconsole). This is for a case if you have two or more Storage
that are capable to use the volume(s) used for restore. But please note if the MediaType
of the provided Storage
in the storage
parameter will be different than the volume MediaType
, then the restore will not work and Bacula should warn about it.
For your configuration, this is first time when I am seeing more Device
directives in the Director Storage
resource. I think there should be only one Device
that indicates to the Storage Daemon Autochanger
(if it is autochanger) or to Device
if it is single device. In your case it will be the SD Autochanger name.
I am seeing that you use the same MediaType
for two Storage
resources. If they are two different file storage (that does not share the same directory on the SD side), then the MediaType
should be different because otherwise it is information for Bacula that both UsersFile
and VMsFile
are capable to use the same volumes.
If the devices are selected randomly from both Storage for doing restores for the same jobids, I would propose to do:
1) Define one Device
directive in the Director Storage resources that is the Autochanger.
2) If you want to have devices reserved for restore, then you can set ReadOnly = yes
directive for selected Devices on the SD side. Otherwise Bacula will decide about choosing the device in autochanger.
3) If you select file versions from the Bacularis restore file versions box, please make sure that the selected versions are stored on volumes from storage that you want to use (for each file version there is yellow tooltip that shows the volume).
At the end I have a question if you are trying to restore from backup or from the copy job? If it is the copy job, in the latest Bacularis version 5.0.0
we fixed restore from incremental/differential level copies that can have impact on the storage selection for restore. But it is fix for restore from copy jobs. For restore from backups it should work well in 4.0.0
.
And finally, I encourage to upgrade to 5.0.0
. This is the major release with packages available in all repositories for everybody.
Please let us know if it helped.
Best regards,
Marcin Haba (gani)