Bacula-users

Re: [Bacula-users] Change media type of existing media

2010-06-10 14:27:41
Subject: Re: [Bacula-users] Change media type of existing media
From: Robert LeBlanc <robert AT leblancnet DOT us>
To: bacula-users <bacula-users AT lists.sourceforge DOT net>
Date: Thu, 10 Jun 2010 11:55:09 -0600
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.


Robert LeBlanc
Life Sciences & Undergraduate Education Computer Support
Brigham Young University
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Bacula-users] Change media type of existing media, Robert LeBlanc <=