#2301 Issue closed: Outdated /root/rear-DATE-TIMESTAMP.log symlink points to wrong target

Labels: cleanup, fixed / solved / done, minor bug

jsmeix opened issue at 2019-12-13 13:15:

Current ReaR master code:

I did a second "rear recover" on my laptop.

See https://github.com/rear/rear/issues/2300#issue-536902187
for the system details of "my laptop".

Now I have in the (two times) recreated system:

# ls -lhtr /root/rear-*
lrwxrwxrwx 1 root root 41 Dec 11 17:26 /root/rear-2019-12-11T17:26:13+01:00.log -> /var/log/rear/recover/rear-linux-88cr.log
lrwxrwxrwx 1 root root 41 Dec 12 14:23 /root/rear-2019-12-12T14:23:30+01:00.log -> /var/log/rear/recover/rear-linux-88cr.log

# ls -l /var/log/rear/recover/rear-linux-88cr.log
-rw-r--r-- 1 root root 763855 Dec 12 14:23 /var/log/rear/recover/rear-linux-88cr.log

The old rear-2019-12-11T17:26:13+01:00.log symlink
points to the same latest /var/log/rear/recover/rear-linux-88cr.log
that actually belongs to the newest rear-2019-12-12T14:23:30+01:00.log.

Outdated /root/rear-DATE-TIMESTAMP.log symlinks should be simply removed
in wrapup/default/990_copy_logfile.sh just before creating the current one.

I think it is not needed to keep old /var/log/rear/recover/rear-linux-88cr.log
(at least not for now until a user really requests that with a good reason)
because "rear recover" means installation (reinstalling from scratch),
cf.

Disaster recovery means installation (reinstalling from scratch)

in https://en.opensuse.org/SDB:Disaster_Recovery
so in a "(re)installed from scratch" system there should be usually
no need for a log file from a previous (re)installation from scratch.

jsmeix commented at 2019-12-17 16:04:

With https://github.com/rear/rear/pull/2302 merged
this issue should be fixed.


[Export of Github issue for rear/rear.]