[Patch] ACF/LBU and "lbu lb" don't show latest backup as option for restoring
Calling “Local backups”->“Config” in the ACF web GUI will only list backups with timestamps in the section “Backup Archives”, but not the most recent backup named “${hostname}.apkovl.tar.gz” and does therefore not allow to revert to the most recent backup.
There are two possible solutions:
1. Timestamping the backup right after its successful creation
--- /sbin/lbu
+++ /sbin/lbu.modif
@@ -468 +468,3 @@
- if ! cmd_package "$outfile"; then
+ if cmd_package "$outfile"; then
+ backup_apkovl "$outfile"
+ else
Pro: All backups are listed with meaningful timestamps.
Contra: I have not tested, if the absence of a “*.apkovl.tar.gz” file
as most recent backup may cause other parts of the lbu script to
malfunction or misbehave, e.g. restore_apkovl().
2. Additionally list “*.apkovl.tar.gz” when “lbu lb” is invoked
--- /sbin/lbu
+++ /sbin/lbu.modif
@@ -563 +563 @@
- ls -1 "$mnt"/*.[0-9][0-9]*[0-9][0-9].tar.gz* 2>/dev/null | sed 's:.*/::'
+ ( ls -1 "$mnt"/*.[0-9][0-9]*[0-9][0-9].tar.gz* 2>/dev/null; ls -1 "$mnt"/*.apkovl.tar.gz* 2>/dev/null ) | sed 's:.*/::'
Pro: This does only modify the listing of existing backups with no
implications regarding the rest of the code.
Contra: The latest backup can not be associated with a certain point in
time, because it has no timestamp, so it’s a “hit and miss” when
reverting to this backup.
(from redmine: issue id 2964, created on 2014-05-23, closed on 2014-05-26)