luci
luci copied to clipboard
luci-mod-system: Add checkbox to add installed files in backup
Steps to reproduce:
- Go to System → Backup / Flash Firmware
- On the Backup section, click on "Generate archive"
- Extract the archive
Actual behavior:
The file etc/backup/installed_packages.txt
is not in the backup
Expected behavior:
The file etc/backup/installed_packages.txt
is not in the backup
Additional Information:
OpenWrt version information from system /etc/openwrt_release
Example: Replace the following lines and remove this
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='22.03.0'
DISTRIB_REVISION='r19685-512e76967f'
DISTRIB_TARGET='ramips/mt7621'
DISTRIB_ARCH='mipsel_24kc'
DISTRIB_DESCRIPTION='OpenWrt 22.03.0 r19685-512e76967f'
DISTRIB_TAINTS=''
I've been browsing the code and, if I understood it right, the part choosing the files to backup is https://github.com/openwrt/luci/blob/0ea74956c9e7ae415cf6ef11d810888c422db309/modules/luci-mod-admin-mini/luasrc/controller/mini/system.lua#L16-L55
And specially I think that line 19 should be replaced by:
local backup_cmd = "sysupgrade -k -b - 2>/dev/null"
As this already generates a .tar.gz
file that gets sent to the command line.