I concur with Wanderlei.  Another aspect of moving volumes between storage 
devices is the need to change the mediatype.  Bacula bconsole does not provide 
a command to change the mediatype.

Patti

From: Wanderlei Huttel 
<wanderleihut...@gmail.com<mailto:wanderleihut...@gmail.com>>
Date: Thursday, May 5, 2016 at 7:24 AM
To: 
"bacula-users@lists.sourceforge.net<mailto:bacula-users@lists.sourceforge.net>" 
<bacula-users@lists.sourceforge.net<mailto:bacula-users@lists.sourceforge.net>>
Subject: Re: [Bacula-users] How to properly remove volumes in regards to the 
catalog?

Hello Kern

I understand your concerns about make changes by hand in bacula database, but 
it wouldn't be interesting create an option in update to move volumes to 
another Storage?
An exemple: you can have 2 disks with 1TB (everyone with one storage) and you 
will change for a new one of 4TB. In this case is not necessary 2 storages but 
just one.
You can move all volumes from both 1TB hard disk to the new one 4TB.


Best Regards

Wanderlei Hüttel
http://www.huttel.com.br

2016-05-04 8:18 GMT-03:00 Kern Sibbald 
<k...@sibbald.com<mailto:k...@sibbald.com>>:
Hello,

I strongly encourage users to use Bacula bconsole commands to accomplish *all* 
modifications of the catalog database.  Making changes by hand using SQL will 
quite often lead to inconsistencies in the catalog that can come back to haunt 
you. In addition, much of the SQL for MySQL and PostgreSQL is different, which 
can also cause problems.  Bacula via bconsole knows how to handle the database 
for both MySQL and Postges.  It is *extremely* rare that I do any modification 
of the database by hand -- maybe 2 times in 16 years.

Best regards,
Kern


On 05/04/2016 12:13 PM, Florian Splett wrote:

Hello and sorry for the late response.

I just wanted to thank you for all the information.
Definitely helped me decide on how to approach the issue.

Regards,

Florian S.

Am 28.04.2016 um 13:04 schrieb Wanderlei Huttel:
Hello Florian


2016-04-28 5:47 GMT-03:00 Florian Splett 
<florian.spl...@web.de<mailto:florian.spl...@web.de>>:
Hello, bacula community.

The harddrive my bacula system is using to store its volumes is reaching
its maximum capacity, so I had the following plan for my network:

I want to manually move the old volumes onto an external harddrive and
keep that somewhere else.

Now what i want to ask is: Does this cause complications with the catalog?
It depends if they will be recycle soon or not
I guess so, since the volumes will be just gone.
Can I somehow tell the catalog that the volumes should be marked as
"unavailable" or something like that?
You can update Volume Status and set to "Archive" or "Disabled"
*update
1: Volume parameters
1: Volume Status

...or is it in fact perfectly fine to just remove those volumes?
Or you could create another Storage Resource in bacula-dir.conf and new Device 
in bacula-sd.conf and use this external harddrive as a Storage.
Move those Volumes to the external harddrive.

Get StorageId from New Storage:
*sqlquery
Entering SQL query mode.
Terminate each query with a semicolon.
Terminate query mode with a blank line.
Enter SQL query: select StorageID, Name, Autochanger from Storage;
+-----------+---------------+-------------+
| StorageID | Name          | Autochanger |
+-----------+---------------+-------------+
|         1 | StorageLocal1 |           0 |
|         3 | StorageLocal2 |           0 |
+-----------+---------------+-------------+

Use this below sql to get information about Volumes x Pool x Storage

select M.MediaId, M.VolumeName, M.StorageId, S.Name, M.PoolId, P.Name from 
Media M  left join Storage S on (M.StorageId = S.StorageId) left join Pool P on 
(M.PoolId = P.PoolId) order by M.VolumeName;

*sqlquery
Entering SQL query mode.
Terminate each query with a semicolon.
Terminate query mode with a blank line.
Enter SQL query: select M.MediaId, M.VolumeName, M.StorageId, S.Name, M.PoolId, 
P.Name from Media M  left join Storage S on (M.StorageId = S.StorageId) left 
join Pool P on (M.PoolId = P.PoolId) orde; by M.VolumeNam
+---------+---------------------+-----------+---------------+--------+---------+
| MediaId | VolumeName          | StorageId | Name          | PoolId | Name    |
+---------+---------------------+-----------+---------------+--------+---------+
|      36 | Volume-Diario-0001  |         1 | StorageLocal1 |      6 | Diaria  |
|      51 | Volume-Diario-0002  |         1 | StorageLocal1 |      6 | Diaria  |
|      74 | Volume-Diario-0003  |         1 | StorageLocal1 |      6 | Diaria  |
|      89 | Volume-Diario-0004  |         1 | StorageLocal1 |      6 | Diaria  |
|      96 | Volume-Diario-0005  |         1 | StorageLocal1 |      6 | Diaria  |
|      97 | Volume-Diario-0006  |         1 | StorageLocal1 |      6 | Diaria  |
|      98 | Volume-Diario-0007  |         1 | StorageLocal1 |      6 | Diaria  |
...

Update the volumes that you have moved to external hard drive to NewStorage 
(change StorageId).

*sqlquery
update Media set StorageId = 3 where PoolId = 6; # Move all volumes from a Pool 
or
*sqlquery
update Media set StorageId = 3 where MediaId in (36,51,74,89,96);

I guess this can help you.

Best Regards

Wanderlei Hüttel
http://www.huttel.com.br


Regards,

Florian S.

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net<mailto:Bacula-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/bacula-users




------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z



_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net<mailto:Bacula-users@lists.sourceforge.net>https://lists.sourceforge.net/lists/listinfo/bacula-users




------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z



_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net<mailto:Bacula-users@lists.sourceforge.net>https://lists.sourceforge.net/lists/listinfo/bacula-users


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net<mailto:Bacula-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/bacula-users


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to