Skip to content
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

FS#552 - Backup & restore of additionally installed packages #5572

Open
openwrt-bot opened this issue Feb 24, 2017 · 3 comments
Open

FS#552 - Backup & restore of additionally installed packages #5572

openwrt-bot opened this issue Feb 24, 2017 · 3 comments
Labels

Comments

@openwrt-bot
Copy link

rohberrick:

There is a discussion and also two different scripts available here:
[[https://forum.lede-project.org/t/feature-request-for-backup-functionality/603]]

Is it possible to incorporate some kind of this functionality into the standard distribution to lower the bar for newbies?

Script one:
[[https://forum.openwrt.org/viewtopic.php?pid=194478#p194478]]

second:
[[https://github.com/richb-hanover/OpenWrtScripts/blob/master/config-openwrt.sh]]

@openwrt-bot
Copy link
Author

richb-hanover:

Good news! The luci-app-attendedsysupgrade package does exactly what I was hoping for. Once installed in 19.07 & 21.02, you simply request a new build for your router, and it gets installed.

The package ships a list of the manually installed (non-default) packages to the ImageBuilder at https://asu.aparcar.org. The ImageBuilder creates a new image and sends it back to the browser, which then uploads the image to the router for flashing.

There's brief documentation at https://github.com/aparcar/asu#luci-app and you can see it in action at: https://www.youtube.com/watch?v=H7xcmhbYsX8

@openwrt-bot
Copy link
Author

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.

@Doppel-D
Copy link

Doppel-D commented Jun 10, 2022

Great news, two possible options. A big thank you to all who participated! I tried the attended sysupgrade and it worked like a charm!

One suggestion: There is already a menue item "backup / flash firmware", what about integrating attendedsysupgrade into that instead of generating a seperate entry?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants