My environment contains several dbs (catalog) which are meant to separate 
clients by product. Running Bareos 14.2. I just ran into an issue restoring a 
client. The error complained about not finding the storage resource "Storage2". 
This storage resource was used in the past but was removed from the configs. 
The restore should've been using "Storage1" as i defined in the restore process 
which I thought was odd. So I dug into the dbs and noticed the Storage table of 
each db was in a different order from each other. Doing some more digging I 
came to a conclusion that the backups use a single specific db when assigning 
the StorageId for a Media/Volume because that is where all the catalogs' media 
StorageIds match and no other db. When a restore is done though it uses that 
client's associated db which has the incorrect order. This is why the restore 
is complaining about "Storage2" when in fact it should be using "Storage1". 

Ex. 
Storage1 in db1 has StorageId = 1
Storage2 in db1 has StorageId = 2

Storage1 in db2 has StorageId = 2
Storage2 in db2 has StorageId = 1

Lets say the backups choose db1 as the db to associate StorageIds when 
Medias/Volumes are created. Now when a restore of a client in db2 is done it 
will see StorageId = 1 for that media/volume associated with the backup and 
look at "Storage2" to do the restore. Though I have found if Storage2 is 
defined then there is no issue but if Storage2 is not defined in the configs 
(like this case) then it will cause the restore to fail.

My temp solution is to not delete any catalogs/storages from the configs. 

Has anyone ran into this issue and what have you done to mitigate it? 

Would a long term solution be to sync all the dbs' Storage table with the 
"primary" db that the backups are using for the Storage table and never remove 
that db? Is it possible to make the backups use the associated db's Storage 
table of that client for assigning StorageIds to the medias/volumes?

Zach

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to