Option to specify the rear config file to use #68

pavoldomin opened this Issue Apr 12, 2012 · 8 comments


None yet

4 participants


Assume, we want to automate rear backup with the different setup on different days. E.g. ISO & tar.gz to URL on Mondays and OBDR on Fridays. The possible method would be to have option, that tells rear, which config files to use, like,

rear -d /etc/rear.monday/ -v mkrescue 

would source local.conf (and other .conf) in /etc/rear.monday/.


I would prefer a specific option like:

rear -v -c /etc/rear/monday.conf mkrescue

Which is more in line with how other Unix tools work. But the functionality looks interesting.


How would we here handle another conf files rear sources - site.conf, local.conf, rescue.conf, disklayout.conf.
Also, when we do a recovery, it should proceed transparently, without need to specify proper conf file, accordingly to initrd we booted from, i.e. configuration dir would be copied as /etc/rear to initrd image


There are various ways to do this. Currently we only discussed functionality. It is quite likely we have to modify the current implementation and how config files are handled in order to support this functionality, so I don't want to go into the details of a (possible) implementation and first discuss how it should work.

And you are right, the specified configuration should be used inside the rescue image that is created. That is a functional requirement.

gdha commented Jun 1, 2012

interesting idea, but not very practical in recovery mode I think. How would we know which local*.conf was used? To be honest I'm not in favour of this proposal.


The background for the proposal is to have recovery media 'highly available'. In fact, we have several customers requesting such functionality (and people work it around by hacking rear script or writing wrappers). I do not see problem with selection of correct local_.conf file in recovery mode really: recovery image will only handle /etc/rear/_ with the actual conf files included at time of mkrescue, assuming my '-d /path/to/rear_conf_dir' proposal:

Another possibility: rear would check, whether environment variable like "REAR_CONF_DIR" is exported, and read the config from path it specifies. Cron would than schedule jobs like "REAR_CONF_DIR=/etc/rear.monday rear mbackup".


Please let us not discuss the technical implementation now, but first look at the requirements and use-cases. I don't want a discussion of a technical implementation if we haven't fully looked into the merits of such functionality. Since there are higher priority items on the plate, I prefer if we pick this up later. And who knows, by that time other functionality can be taken into account too.

(For example, we plan to make Rear usable without the need to install it. Which could be a solution to your needs as well. But even if that's not preferable for whatever reason, the reorganization might bring other insights. So don't look at the technical implementation just yet for now...)


Sure, absolutely. Just consider my speculations here as low priority feature request.

jhoekx commented Apr 3, 2013

This is implemented in 28bac7a and working for me. More testing is welcome.

@jhoekx jhoekx closed this Apr 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment