Moving a volume to another Storage's Device in File mode

980 views
Skip to first unread message

Olivier Gagnon

unread,
Jan 13, 2014, 3:50:25 PM1/13/14
to bareos...@googlegroups.com
Hello,

Here is the situation:

I have a Pool named FileMonthly where the Full backup are made each month. The Volumes are 2TB and upon completion, are stored on 2TB Hard Drives that are sent off site.

I created another Storage pointing to the Hard Drive bay mount point of the server, another Pool named Offsite using and used the 'update' command to move the Volumes to this Pool.

However, if I want to restore from it, the job will look by default on the Storage the Backup Job was made on for the Volume. Not the Storage of the Pool it is in.

There are 3 ways to resolve that but none are suitable. I could update the StorageId of the Volumes after their creation. I could create a symlink to the Volume after mounting the HD. And I could force the storage while using the restore command. Solution 1 is a hack. Solution 2 demands to log on the server and too manual. Solution 3 would break a restore with Volumes in two different Storage.

Is there a better way to achieve what I want ?

Thanks,

O.

Philipp Storz

unread,
Jan 14, 2014, 5:15:21 AM1/14/14
to bareos...@googlegroups.com
Hello Olivier,

if I remember right, I had a similar problem long ago when I did a disaster recovery with a live DVD.

Intersting was, that the restore from a different device did not work the first time, but the second
time I tried it.

Could you please try to restore, cancel that restore then when it cannot do the restore, and do that
restore again?

If that works, we can try to debug what is going wrong, because I think in principle what you do
should work automatically (find the volume also in the other storage).

Best regards,

Philipp
--
Mit freundlichen Grüßen

Philipp Storz philip...@bareos.com
Bareos GmbH & Co. KG Phone: Phone: +49221630693-92
http://www.bareos.com Fax: +49221630693-10

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Geschäftsführer: Stephan Dühr, M. Außendorf,
J. Steffens, P. Storz, M. v. Wieringen

Olivier Gagnon

unread,
Jan 14, 2014, 11:52:21 AM1/14/14
to Philipp Storz, bareos-users
Hi Philipp,

I try what you said and it didn't work. Here are the logs:

----------------------

Bootstrap records written to /var/lib/bareos/DaVinci-dir.restore.4.bsr

The job will require the following
   Volume(s)                 Storage(s)                SD Device(s)
===========================================================================
  
    Monthly-1-2014-2627       RAID                      RAIDStorage             

# cat /var/lib/bareos/DaVinci-dir.restore.4.bsr
Storage="RAID"
Volume="Monthly-1-2014-2627"
MediaType="File"
Device="RAIDStorage"
VolSessionId=33
VolSessionTime=1389643638
VolAddr=213-947737
FileIndex=1-1561
Count=1561


14-Jan 11:33 DaVinci-dir JobId 2628: Start Restore Job RestoreFiles.2014-01-14_11.33.48_51
14-Jan 11:33 DaVinci-dir JobId 2628: Using Device "RAIDStorage" to read.
14-Jan 11:33 DaVinci-sd JobId 2628: Warning: acquire.c:226 Read open device "RAIDStorage" (/mnt/Data/bareos) Volume "Monthly-1-2014-2627" failed: ERR=dev.c:556 Could not open: /mnt/Data/bareos/Monthly-1-2014-2627, ERR=No such file or directory

14-Jan 11:33 DaVinci-sd JobId 2628: Please mount read Volume "Monthly-1-2014-2627" for:
    Job:          RestoreFiles.2014-01-14_11.33.48_51
    Storage:      "RAIDStorage" (/mnt/Data/bareos)
    Pool:         File
    Media type:   File

--------------------------------

It's the same thing after the cancel and 2nd restore.

As you can see, the Device is explicitly written in the Bootstrap file.

The way I see it, you should be able to write more than one Device in the Storage definition of the Director.
In my case, the Storage "RAID" would have the Devices "RAIDStorage" (the default) and "Offsite".

O.


--
You received this message because you are subscribed to a topic in the Google Groups "bareos-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bareos-users/ufe9OfvyYVE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bareos-users...@googlegroups.com.
To post to this group, send email to bareos...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Olivier Gagnon

unread,
Jan 14, 2014, 11:58:36 AM1/14/14
to bareos...@googlegroups.com, Philipp Storz
I forgot to add:

If I change the Device to Offsite in the Storage definition of the Director OR the first one if I put the two Devices in the definition, it works.

That means Bareos expects to find the Volume on the first Device defined in the Storage associated to the Volume StorageId.

O.

Seitan

unread,
Sep 3, 2015, 8:03:01 AM9/3/15
to bareos-users, philip...@bareos.com
Hello groups,
we are having the same exact problem.
We are using three separate devices for full, diff and inc backups.
If we try to restore latest backup of specific client, tries to find files from Diff device in Full device:

Read open device "DevFull" (/bareos/full/) Volume "Differential-0003" failed: ERR=dev.c:616 Could not open: /bareos/full/Differential-0003, ERR=No such file or directory

Seitan

unread,
Sep 3, 2015, 8:47:59 AM9/3/15
to bareos-users, philip...@bareos.com
Okay, I've managed to solve this, by adding different Media Type = Names in dir and sd config for each device/storage.

Reply all
Reply to author
Forward
0 new messages