Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReaR + Bareos >16.2 new configuration path/filename structure #1077

Closed
wnglobal2000 opened this issue Nov 22, 2016 · 11 comments
Closed

ReaR + Bareos >16.2 new configuration path/filename structure #1077

wnglobal2000 opened this issue Nov 22, 2016 · 11 comments
Assignees
Labels
bug The code does not do what it is meant to do external tool The issue depends on other software e.g. third-party backup tools. fixed / solved / done support / question
Milestone

Comments

@wnglobal2000
Copy link

Relax-and-Recover (rear) Issue Template

Please fill in the following items before submitting a new issue (quick response is not guaranteed with free support):

tree /etc/bareos/
/etc/bareos/
└── bareos-fd.d
├── client
│   └── myself.conf
├── director
│   ├── bareos-dir.conf
│   └── bareos-mon.conf
└── messages
└── Standard.conf

the following error occurs:
rear -v mkrescue
Relax-and-Recover 1.19 / Git
Using log file: /var/log/rear/rear-sandbox201610.log
ERROR: Bareos configuration file (bareos-fd.conf) missing
Aborting due to an error, check /var/log/rear/rear-sandbox201610.log for details
[1] 9490 terminated rear -v mkrescue

  • Work-around, if any
    manually fix Bareos settings in:
    /usr/share/rear/prep/BAREOS/default # ls
    40_prep_bareos.sh
    45_check_BAREOS_client_configured.sh
    50_check_BAREOS_bconsole_results.sh
    55_check_bareos_restore_jobs.sh
    56_check_bareos_filesets.sh

e.g. nano /usr/share/rear/prep/BAREOS/default/45_check_BAREOS_client_configured.sh

Tried with Bareos Version: 16.2.4
dpkg -l | grep bareos
ii bareos-common 16.2.4-12.1 amd64 Backup Archiving Recovery Open Sourced - common files
ii bareos-filedaemon 16.2.4-12.1 amd64 Backup Archiving Recovery Open Sourced - file daemon

@gdha gdha self-assigned this Nov 23, 2016
@gdha
Copy link
Member

gdha commented Nov 23, 2016

@aussendorf Could you have a look at this issue and suggest updates, comments, etc...?

amtuannguyen added a commit to yorkulibraries/rear that referenced this issue Dec 13, 2016
gdha added a commit that referenced this issue Dec 13, 2016
workaround for #1077 (Bareos new conf directories)
@jsmeix jsmeix added waiting for info bug The code does not do what it is meant to do labels Jan 3, 2017
@jsmeix jsmeix added this to the Rear future milestone Jan 3, 2017
@jsmeix
Copy link
Member

jsmeix commented Jan 3, 2017

@aussendorf
could you have a look at this issue and suggest
updates, comments, etc...?

We cannot fix it for ReaR 2.0 - it is too late now
which means Bareos support in current ReaR will
not be as good as possible.

@jsmeix jsmeix added the external tool The issue depends on other software e.g. third-party backup tools. label Jan 4, 2017
@aussendorf
Copy link
Contributor

Hello @jsmeix and @gdha , sorry for my late reply.

I've seen the workaround by @amtuannguyen, which looks like a good approach.
With Bareos 16.2 the 'old' way of using a configuration file is supported as well as the new layout, which uses subdirectories. I fear, that the above commit does not solve all situations, as it only fixes the requirement checking part, while the parts with program calls (like starting the fd) still use hardcoded "-c /etc/bareos/bareos-fd.conf" for example.

As bareos-fd and bconsole don't require a "-c" parameter, I suggest to leave it away. Both binaries will

  1. check, if the default configuration file is present ( /etc/bareos/bareos-fd.conf for fd) is present
  2. check if there is a configuration in the according subdirectory
    So there is no need to specify it and it will work with old and new layout this way.

Unless someone is using another config-filename, in this case an additional option would be needed (but that case wasn't covered anyway).

For the requirement checking I recommend to use -t, as it will check, if a configuration exists and can be loaded.

@gdha
Copy link
Member

gdha commented Jan 12, 2017

@aussendorf Hi Maik - thank you for your insight into this matter (as SME). If you can improve the code do not hesitate and prepare a small pull request.

@aussendorf
Copy link
Contributor

Ok, I've also replaced greps in configfiles by calls to the program with -xc, which dumps the config.
A first shot (UNTESTED) is here:
https://github.com/aussendorf/rear

I've no testing environment at hand right now, so I will probably not be able to test it before next week.

@jsmeix
Copy link
Member

jsmeix commented Jan 18, 2017

Since #1169
is merged this issue should be fixed.

@aussendorf
many thanks for your valuable contribution to ReaR!
In particular for the various different external backup methods
ReaR depends on contributions from pepole who are experts
in the individual backup methods.

@ivveh
Copy link

ivveh commented Apr 13, 2017

Hi,
This error still exists for SLES 11 SP4 (rear-2.00-1.i586.rpm)
Creating with mkrescue or similair works fine. However, restores exits with missing bareos-fd.conf.

@jsmeix
Copy link
Member

jsmeix commented Apr 13, 2017

@ivveh
the fix in #1169
is not in ReaR 2.0 see my above
#1077 (comment)

You need the current ReaR upstream master code.

How to test the currently newest ReaR GitHub master code
independent of an already installed ReaR software:

Basically "git clone" it into a directory and then
configure and run it from within that directory like:

# git clone https://github.com/rear/rear.git

# cd rear

# vi etc/rear/local.conf

# usr/sbin/rear -d -D mkbackup

(note the relative paths "etc/rear/" and "usr/sbin/").

@ivveh
Copy link

ivveh commented Apr 13, 2017

@jsmeix
Hello, I realized that and got the latest snap instead and everything worked out fine.
Sorry for the trouble!

@jsmeix
Copy link
Member

jsmeix commented Apr 13, 2017

@ivveh
no worries!
I appreciate your prompt feedback that it works well
with current ReaR upstream master code.

Such explicit positive feedback helps us a lot
to know things actually do work well because
in particular I do not use third-party backup tools.

I always think I should have a look at third-party backup tools
but I never find the time to actually do it - perhaps I find time
when there are no issues directly in ReaR left... ;-)

@ivveh
Copy link

ivveh commented Apr 14, 2017

@jsmeix
No worries. I must say I'm quite impressed over the automatic restore implementation with rear and bareos.
Just from installing the rpm/deb (tested with both ubuntu 16.04 & sles11 sp4) on a client and with the bareos client with just 4(?) lines of variables in the rear config file I was able to make an iso to a nfs share and restore it fully automated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The code does not do what it is meant to do external tool The issue depends on other software e.g. third-party backup tools. fixed / solved / done support / question
Projects
None yet
Development

No branches or pull requests

5 participants