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
In recovery system HOSTNAME is 'localhost' which is not the name of the original system #1258
Comments
As far as I remember ReaR's default behaviour What worked for me is using USB_SUFFIX. |
@ProBackup-nl I think a lot of things would fail when in the In contrast to you I have in my recovery system RESCUE e205:~ # echo $HOSTNAME e205 As far as I can imagine this is basically a mandatory |
Regarding how HOSTNAME is set in the recovery system see # set hostname export HOSTNAME="$(cat /etc/HOSTNAME)" # set hostname in THIS shell hostname "$HOSTNAME" # set hostname in the system echo Hostname set to $(uname -n) In my recovery system I have RESCUE e205:~ # cat /etc/HOSTNAME e205 and /etc/HOSTNAME in the recovery system is created by |
@ProBackup-nl |
/etc/HOSTNAME in the recovery system is correctly set to "d2".
I don't see any |
@ProBackup-nl I have in rescue.conf in particular NETFS_PREFIX="e205" where "e205" is the hostname of my original system |
@jsmeix I am back from a cycling trip through the south of the Netherlands and Flanders and some hedge trimming at the soon to-be solar farm location. My rescue.conf lists:
Where "d2" is the hostname of my original system (backup source). |
I think the root cause is still that somehow in your recovery system I assume when you do in your recovery system manually export HOSTNAME="$(cat /etc/HOSTNAME)" hostname "$HOSTNAME" or something like that, then it should work. I added some debugging stuff to my That script is listed in usr/share/rear/skel/default/etc/inittab I guess in your particular case systemd does not Fortunately ;-) I am not at all a systemd expert FWIW: $ find usr/share/rear/skel | xargs grep -l 'ExecStart=/etc/scripts/system-setup' usr/share/rear/skel/default/usr/lib/systemd/system/multi-user.target.wants/sysinit.service usr/share/rear/skel/default/usr/lib/systemd/system/run-system-setup.service usr/share/rear/skel/default/usr/lib/systemd/system/sysinit.service I will never ever understand systemd... |
@jsmeix Also strange is that
Where |
I had some trouble with 540_choose_backup_archive.sh I would recommend to use the compliance mode via USB_SUFFIX. But even USB_SUFFIX would not fix the root issue here |
@jsmeix Thanks for the manual hostname setup. The first export step runs fine. The At least the only result of My lean source (Arch Linux) system hasn't got a
I think these are the issues here:
|
@jsmeix I can confirm that on Arch Linux the lower case |
@ProBackup-nl Any additional test during "rear mkbackup/mkrescue" In general regarding "warning" messages see |
@jsmeix @ProBackup-nl We could foresee a symbolic link from |
@gdha I can't find any reason why a symbolic in the recovery environment wouldn't solve this issue. Where should I create the symbolic link to test the symbolic link solution? In I did revert my changes that created a lowercase /etc/hostname. Then I did this:
That made the hostname appear in the (Arch Linux based) recovery environment. |
I think I would prefer to do all what belongs to the |
For the lack of documentation capabilities, and the symbolic link pointing to a not-yet-existing file, I wouldn't prefer the symbolic link solution. Instead modify usr/share/rear/rescue/default/100_hostname.sh to first try to detect whether there is In usr/share/rear/skel/default/etc/scripts/boot I would make the "set hostname" section conditional to the existence of /etc/HOSTNAME. For Arch Linux the hostname will still be set as long as |
With #1286 merged @ProBackup-nl |
OUTPUT=USB
USB_DEVICE=/dev/disk/by-label/REAR-000
BACKUP=NETFS
BACKUP_PROG=rsync
BACKUP_PROG_EXCLUDE=( "${BACKUP_PROG_EXCLUDE[@]}" '/var/cache/' '/var/log/journal/' )
BACKUP_URL=usb:///dev/disk/by-label/REAR-000
In 070 the archive path is build from: $BUILD_DIR/outputfs/$NETFS_PREFIX/$backup_file_name
In 540 the archive path is looking in: $BUILD_DIR/outputfs/rear/$HOSTNAME/* and build from $rear_run/${BACKUP_PROG_ARCHIVE}${BACKUP_PROG_SUFFIX}${BACKUP_PROG_COMPRESS_SUFFIX}
Where 540 error location is build from: $BUILD_DIR/outputfs/rear/$HOSTNAME/*
In my recovery environment $HOSTNAME resolves to localhost.
Which is not the name of the directory where backups are stored.
On the other hand in /prep/NETFS/default/070_set_backup_archive the correct location is chosen, /verify/USB/NETFS/default/540_choose_backup_archive needs some fixing to handle the localhost case correctly for USB/NETFS.
The text was updated successfully, but these errors were encountered: