Move content of a volume to another volume

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Move content of a volume to another volume

Lukas Hejtmanek
Hello,

is there a way in bacula to move all the data from one volume to another
volume in the same pool? I tried migrate job but it seems to be possible to
migrate only from one pool to another.

I just need to move off the data from one tape to replace the tape because of
error of the tape. But I do not want to change relabel a different tape,
I would like to replace volume name of the stored data, i.e., just move the
backup data to a different volume, update db and so on. Is there way?

--
Lukáš Hejtmánek

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Move content of a volume to another volume

Uwe Schuerkamp
On Thu, Jan 05, 2017 at 03:19:00PM +0100, Lukas Hejtmanek wrote:

> Hello,
>
> is there a way in bacula to move all the data from one volume to another
> volume in the same pool? I tried migrate job but it seems to be possible to
> migrate only from one pool to another.
>
> I just need to move off the data from one tape to replace the tape because of
> error of the tape. But I do not want to change relabel a different tape,
> I would like to replace volume name of the stored data, i.e., just move the
> backup data to a different volume, update db and so on. Is there way?
>
> --
> Lukáš Hejtmánek
>

Hm, if you have an error on the tape, how are you going to recover the
data off of it? Or are you saying that you have a tape volume in
status "Error" within your bacula setup?

All the best, Uwe


--
Uwe Schürkamp | email: <[hidden email]>








------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Move content of a volume to another volume

Lukas Hejtmanek
On Thu, Jan 05, 2017 at 05:14:38PM +0100, Uwe Schuerkamp wrote:
> Hm, if you have an error on the tape, how are you going to recover the
> data off of it? Or are you saying that you have a tape volume in
> status "Error" within your bacula setup?

the tape has write error, so I suppose it is still readable..

--
Lukáš Hejtmánek

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Move content of a volume to another volume

Uwe Schuerkamp
On Thu, Jan 05, 2017 at 06:36:10PM +0100, Lukas Hejtmanek wrote:
> On Thu, Jan 05, 2017 at 05:14:38PM +0100, Uwe Schuerkamp wrote:
> > Hm, if you have an error on the tape, how are you going to recover the
> > data off of it? Or are you saying that you have a tape volume in
> > status "Error" within your bacula setup?
>
> the tape has write error, so I suppose it is still readable..
>
> --
> Lukáš Hejtmánek

If you have enough disk space you could try rescuing the data using dd
or cat and creating a replacement volume like this (tape in /dev/st0):

<stop bacula processes>

cat /dev/st0 > /big_file_system/tapedata.dat

mtx unload

<remove old tape>

<insert new tape>

mtx load <slot number>
mt -f /dev/st0 rewind
mt -f /dev/st0 weof # probably unnecessary for a new tape

cat /big_file_system/tapedata.dat >/dev/st0

I have no idea if this would work, but a verbatim copy of the data
on a new tape should be accepted by bacula just fine.

All the best, Uwe



--
Uwe Schürkamp | email: <[hidden email]>






------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Move content of a volume to another volume

Lukas Hejtmanek
On Fri, Jan 06, 2017 at 08:49:49AM +0100, Uwe Schuerkamp wrote:

> If you have enough disk space you could try rescuing the data using dd
> or cat and creating a replacement volume like this (tape in /dev/st0):
>
> <stop bacula processes>
>
> cat /dev/st0 > /big_file_system/tapedata.dat
>
> mtx unload
>
> <remove old tape>
>
> <insert new tape>
>
> mtx load <slot number>
> mt -f /dev/st0 rewind
> mt -f /dev/st0 weof # probably unnecessary for a new tape
>
> cat /big_file_system/tapedata.dat >/dev/st0
>
> I have no idea if this would work, but a verbatim copy of the data
> on a new tape should be accepted by bacula just fine.

doable, unfortunately, this would move the tape label as well but this is
something I don't want to as labels are according to barcodes.

--
Lukáš Hejtmánek

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Move content of a volume to another volume

Radosław Korzeniewski
In reply to this post by Lukas Hejtmanek
Hello,

2017-01-05 15:19 GMT+01:00 Lukas Hejtmanek <[hidden email]>:
Hello,

is there a way in bacula to move all the data from one volume to another
volume in the same pool? I tried migrate job but it seems to be possible to
migrate only from one pool to another.

You can always use the hammer. :)

Just move data from one tape to other tape to the different (or dedicated) pool. Then move the volume from this pool to the original pool with update bconsole command, i.e.
$ update volume=<name> pool=<original>

simple and fast solution

best regards
--
Radosław Korzeniewski
[hidden email]

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Move content of a volume to another volume

Josip Deanovic
On Sunday 2017-01-08 09:21:04 Radosław Korzeniewski wrote:

> Hello,
>
> 2017-01-05 15:19 GMT+01:00 Lukas Hejtmanek <[hidden email]>:
> > Hello,
> >
> > is there a way in bacula to move all the data from one volume to
> > another volume in the same pool? I tried migrate job but it seems to
> > be possible to migrate only from one pool to another.
>
> You can always use the hammer. :)
>
> Just move data from one tape to other tape to the different (or
> dedicated) pool. Then move the volume from this pool to the original
> pool with update bconsole command, i.e.
> $ update volume=<name> pool=<original>
>
> simple and fast solution
>
> best regards


There is a bcopy tool which could be more appropriate in this case:
http://www.bacula.org/7.4.x-manuals/en/utility/Volume_Utility_Tools.html#SECTION00280000000000000000

It can copy an archive from one tape to another or even to a file and
from a file back to a tape.

When it copies an archive from one tape to another it would require two
tape drives.
If two tape drives are not available it is necessary to copy an archive
to a file first.

Since the bcopy tool doesn't modify the catalog, in order to use the
data copied to the new tape it is necessary either to modify the
database manually and change the appropriate tape IDs or even better,
to use bscan tool to automatically update the catalog with all the
data on the new tape after which the old tape could (and probably
should) be deleted from the pool.


Regards

--
Josip Deanovic

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-users
Loading...