Sysupgrade and opkg extras

I am using 22.03.3 on Raspberry Pi 4B 8GB. I installed atlas-probe, syncthing and tor, acme.sh, ddns, etc etc. The installation of the system and additional packages and files is on a hard drive connected with USB 3 and everything works perfectly. How do I preserve everything after a sysupgrade? sysupgrade should preserve the modified configuration files. To preserve the rest do I have to add entire folders and files to sysupgrade.conf? I also started the script for hotplug extras and opkg extras: should they reinstall and remove the packages automatically after the upgrade? Do I need to create a package profile every time I change something or does opkg do it automatically?
What exactly does the command opkg init and opkg save do?

(You add or set everything you want to keep - to save.)

Nothing, there's no such command.

  • (If you mean Sysupgrade extras, see the wiki page.)
  • There are more ways to save after an upgrade now - so it seems you're mixing the two

Yes, I said that (I don't understand the quote):

You then linked the same page, did you see the information contained therein?

(I see that both extra wikis have an init - see the relevant page you linked.)

You linked an sysupgrade extra and I linked an opkg extra. I see what it says on the page, but I don't understand equally what it does, because I am not able to fully understand the script. Anyway great the attended sysupgrade. I was not aware of its existence. But does it also save everything else on the disk? I have a single 1 TB partition in ext4.

Run sysupgrade -l and you'll see what gets saved and restored. You can add your own entries by appending them to /etc/sysupgrade.conf.

Also look into the auc package, it's the command line equivalent of the LuCI Attended Sysupgrade gui package.

2 Likes
Sub-command Description
init Initialize Opkg configuration.
save Save the current Opkg profile to UCI.

~ From: https://openwrt.org/docs/guide-user/advanced/opkg_extras#commands

I read the page I linked to. What do you mean initialize opkg configuration? Speaking in the file language, what does it do? Same for save, what file does it create? What is the resulting file?

  • The quoted information is from the Wiki
  • Since you're unaware of their function - is there a reason you installed the extras?
  • Are you following some instructions?

I realized that it allows me to get back the same packages I had before an upgrade. I have used it in the past. It worked. I wanted to understand more about it. But that's okay for now. Otherwise it becomes a boring post. Thanks anyway.

OK!

That makes sense.

  • You only need extras or Attended Sysupgrade
  • You shouldn't need both

Keep in mind that you seem to have set up an extroot (like) system, but OpenWrt has no ABI warranties between releases (on the contrary, it's pretty much guaranteed to change). This means you can't retain 'old' binaries over a sysupgrade, as they will crash due to soname and ABI issues, these externally managed binaries need to be updated to their current versions as well (but there is nothing like imagebuilder or auc to cover those external files outside the normal rootfs).

1 Like