On Wed, Mar 3, 2010 at 5:40 PM, Robert LeBlanc
<robert AT leblancnet DOT us> wrote:
Hello all,
I've got some file storage that I use for backups and I've created a
few storage declarations for a few pools which are just different
directories on the same file system. I specified "Media Type = File"
for all the declarations and when I went to do a restore that spanned
multiple of these storage declarations, I got an error similar to
"Please mount volume X in storage A", but that volume is in storage B.
I was able to just move the file to the storage A directory and it was
happy, then I moved it back.
I found that what I should have done when I set everything up was to
give each storage a different Media Type (like File-A, File-B, File-C,
etc). How can I change the media type for existing volumes? In Bat
there doesn't seem to be a way to change it on a volume basis. Will
'update' then 'volume parameters' then 'All Volumes from Pool' do the
trick if I make the appropriate changes in bacula-dir.conf and
bacula-sd.conf first? Or will this require some direct SQL
manipulation?
For anyone needing to do this, what I did was change the MediaType in the SD and DIR configs, then went into the database and looked up the PoolID in the Pool table, then updated the MediaType in the Media table for each pool. Now each File Device has it's own Media Type and now when restoring from Daily, Weekly, Monthly volumes, it now changes on it's own instead of me having to move the files around.
Do yourself a favor and when using multiple File type storages, use a different Media Type to start with.