Bareos Copy job and remote storage daemon

492 views
Skip to first unread message

Nicolas Jovanovic

unread,
Jul 19, 2018, 4:19:25 PM7/19/18
to bareos-users
Hello Team,

I have two BareOS installations, each one with one storage daemon, clients, a director and a console.
I am able to backup locally and restore locally my Job from my local Storage daemon to my local file daemon; I wanted to add an offsite backup feature and it seems that the copy job should be the solution.

After reading the documentation and setting up my new configs, my jobs are now copied to a remote storage daemon (which is the first important step) and, as always, I am able to use my local backup to restore my local fileset on my local clients.

However, I tried to perform a restore on a local client with a remote storage daemon (my copy job processed this job to the external storage daemon), and unfortunately, it didn't work as expected :

Bareos local director logs provided me the following output :

19-Jul 21:59 bareos-dir JobId 29: Start Restore Job RestoreFiles.2018-07-19_21.59.36_31
19-Jul 21:59 bareos-dir JobId 29: Using Device "File2" to read.
19-Jul 21:59 bareos-sd JobId 29: Fatal error: No Volume names found for restore.
19-Jul 21:59 c764-bareos-a-client-fd JobId 29: Fatal error: dir_cmd.c:2643 Bad response to Read Data command. Wanted 3000 OK data
, got 3000 error

19-Jul 21:59 bareos-dir JobId 29: Using Device "File1" to read.
19-Jul 21:59 bareos-dir JobId 29: Fatal error: Bad response to Storage command: wanted 2000 OK storage
, got 2800 End Job TermCode=102 JobFiles=0 ReadBytes=0 JobBytes=0 Errors=1 VSS=0 Encrypt=0

19-Jul 21:59 bareos-dir JobId 29: Error: Bareos bareos-dir 17.2.4 (21Sep17):
Build OS: x86_64-redhat-linux-gnu redhat CentOS Linux release 7.4.1708 (Core)
JobId: 29
Job: RestoreFiles.2018-07-19_21.59.36_31
Restore Client: c764-bareos-a-client
Start time: 19-Jul-2018 21:59:38
End time: 19-Jul-2018 21:59:38
Elapsed time: 0 secs
Files Expected: 6which wh
Files Restored: 0
Bytes Restored: 0
Rate: 0.0 KB/s
FD Errors: 1
FD termination status:
SD termination status: Waiting on FD
Termination: *** Restore Error ***

19-Jul 21:59 bareos-dir JobId 29: Error: Bareos bareos-dir 17.2.4 (21Sep17):
Build OS: x86_64-redhat-linux-gnu redhat CentOS Linux release 7.4.1708 (Core)
JobId: 29
Job: RestoreFiles.2018-07-19_21.59.36_31
Restore Client: c764-bareos-a-client
Start time: 19-Jul-2018 21:59:38
End time: 19-Jul-2018 21:59:38
Elapsed time: 0 secs
Files Expected: 6
Files Restored: 0
Bytes Restored: 0
Rate: 0.0 KB/s
FD Errors: 2
FD termination status:
SD termination status: Waiting on FD
Termination: *** Restore Error ***

*

After checking the documentation, I performed a more agressive test : I deleted the local volume (which contains my local backup; it's a virtual lab), indeed, just after preparing my restore job, Bareos automatically selected the remote Storage daemon (which contains the other copied job), and it was able to perform the restore process.

Do you know if it's possible to use another storage daemon with a copied job when original volume still exists ? Is it a normal behaviour ? Did I miss something ?

Thanks for your help.

Best regards,

Nicolas

Bruno Friedmann

unread,
Jul 20, 2018, 2:30:34 AM7/20/18
to bareos...@googlegroups.com
Hi Nicolas, the behavior you've seen, aka use the copy media once the original is no more available is what is documented and how it works here since years.

While I'm writing this emal, I discover that I didn't make a test by updating the status of original media to Error and check if the restore then is using the copied media.

From memory (as on the road) the way of copy jobs and how it is handled in the database is quite well explained in the documentation. Also with its limited use case.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Nicolas Jovanovic

unread,
Jul 20, 2018, 2:59:33 AM7/20/18
to bareos-users
Hello Bruno,

Thanks for your message.

In my case, I was able to restore files if my original media was not available. My main concern (and I do not know if I misconfigure something)is if both media (Original and Copy) are available, if I want to restore files from the Copy (so the remote media) : I have an error saying that no Volume Names were found.

Ideally, I could use local or remote storage daemon without an issue... But not in my actual configuration.

Regards,

Nicolas

Bruno Friedmann

unread,
Jul 20, 2018, 4:25:36 PM7/20/18
to bareos...@googlegroups.com
This is a normal behavior, the copy job and the files associated become active only when the original media disappear (this is what a copy if normal for :-) )
So as you experiment, your copy jobs and your configuration is working as expected and documented.
I didn't personnaly experiment too much if there special status of the media that would drive the database to shift and use the copy, but from memory this is not implemented.
So try to trick the software and the way it behave normally finish in a worse situation ...

Did you have a useful use case of using the copy, if the local (original)one exist?

Nicolas Jovanovic

unread,
Jul 29, 2018, 4:48:33 PM7/29/18
to bareos-users
Hello,

Sorry for the delay.

My main idea was to use the remote storage daemon to restore files to the remote storage without using bandwith between distant site.

Regards,

Nicolas

Bruno Friedmann

unread,
Jul 31, 2018, 2:19:33 AM7/31/18
to bareos...@googlegroups.com
If you still need the file on the first location, I'm afraid this will not be possible. Otherwise you can investigate on Migration.
Reply all
Reply to author
Forward
0 new messages