#3005 Issue open: USE_RESOLV_CONF should default to "no" for USB backups (or update quickstart guide to cover this)

Labels: support / question

danboid opened issue at 2023-06-05 15:41:

  • ReaR version ("/usr/sbin/rear -V"):

2.7

  • OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):

Ubuntu 20.04

  • Description of the issue (ideally so that others can reproduce it):

Its not currently mentioned in the rear quickstart guide but since rear 2.6 (I think?) users backing up to USB must add the line:

USE_RESOLV_CONF="no"

To their rear.conf for mkrescue and mkbackup to work, otherwise rear prints the error:

ERROR: No nameserver or only loopback addresses in ..., specify a real nameserver via USE_RESOLV_CONF

Surely if the user has set OUTPUT=USB rear should know to default to USE_RESOLV_CONF="no" ?

If there is a reason why USE_RESOLV_CONF="no" can't be made the default for OUTPUT=USB, making it unnecessary to add in the extra line to rear.conf, then that option should be added to the example rear.conf in the quickstart guide:

http://relax-and-recover.org/documentation/getting-started

Otherwise users will get an error on their first attempt at using rear which isn't a good first impression.

jsmeix commented at 2023-06-06 07:41:

@danboid
I do not understand how USE_RESOLV_CONF is related to OUTPUT.
As far as I understand it both are totally different things.
Please explain how USE_RESOLV_CONF is related to OUTPUT
at least in your specific use case and preferably
how USE_RESOLV_CONF is related to OUTPUT in general.

danboid commented at 2023-06-06 08:34:

If OUTPUT=USB then the user is backing up to and restoring from USB so there should be no need for networking and DNS to be configured and hence no need to configure USE_RESOLV_CONF.

pcahyna commented at 2023-06-06 08:40:

you can have a USB bootable medium and backup on network. (BACKUP and OUTPUT are mostly unrelated.)

danboid commented at 2023-06-06 08:44:

Right, so the way I should've phrased this is could we have it so that when BACKUP=usb:///something rear defaults to USE_RESOLV_CONF=no?

pcahyna commented at 2023-06-06 08:50:

I would prefer to fix the actual problem. Why does ReaR fail with ERROR: No nameserver or only loopback addresses in ..., specify a real nameserver via USE_RESOLV_CONF and what is ... in this message, are there literally three dots?

danboid commented at 2023-06-06 08:52:

No, thats me being too lazy to type out a long path to a file.

I should note that this test machine wasn't connected to the internet when being backed up so resolv.conf may have been missing / unconfigured.

jsmeix commented at 2023-06-06 08:56:

FYI:
This is an old issue on Ubuntu that
there special nameserver stuff is used
where ReaR's automatisms do not (yet?) work,
see my USE_RESOLV_CONF description in default.conf

I am not an Ubuntu user so I cannot fix ReaR
when there are Ubuntu specific issues and
we do not have a ReaR upstream maintainer for Ubuntu.

danboid commented at 2023-06-06 09:20:

OK so it looks like the resolution to this is to update the rear.conf in the quickstart guide with a note that Ubuntu (and Debian too, maybe? Maybe is caused by netplan which is specific to Ubuntu) users may have to add the USE_RESOLV_CONF option.


[Export of Github issue for rear/rear.]