[FS#552] Backup & restore of additionally installed packages

OpenWrt Bugs openwrt-bugs at lists.openwrt.org
Mon Nov 22 14:30:41 PST 2021


The following task has a new comment added:

FS#552 - Backup & restore of additionally installed packages
User who did this - Luiz Angelo Daros de Luca (luizluca)

sysupgrade can already save a list of installed packages with -k option.
You also have options '-o -u' to save everything that is not from a package nor a changed config file. Sum both together and you'll have:

# sysupgrade -o -u -k openwrt-....img

After reboot, you'll have a list of installed packages at /etc/backup/installed_packages.txt. You just need to "parse" it and run opkg install:

opkg update && grep '\toverlay' /etc/backup/installed_packages.txt | cut -f1 | xargs opkg install

I do that all the time.

The issue is that those packages that you are installing might be required to access the internet. The custom image generated by attendedsysupgrade is one solution for that problem. However, all the "extra packages" will be part of the image and not "upgradable" (but it is not an issue if you have plenty of flash space).

Another one would be a way to pack all required ipk files into the backup with a  script that install them at early stages (uci-defaults?). I never did that but I think it is feasible, specially if an external service (like attendedsysupgrade) could gather those packages with dependencies for you.

More information can be found at the following URL:

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.

More information about the openwrt-bugs mailing list