Could you please advise if there is a way to create a backup of a system?
I added some packages to my router, and for example, if I want to bring through this config to another router, or have to recover from an issue, and I do a factory reset, how I can bring back the original configuration (with additional packages, config, credentials)?
I am not sure, whether the LuCi backup can restore all these ...
You can make system packages clone from the link provided by owut / auc.
Config backup is designed to cover all configs.
If you have extra data on USB, extra partition youll need to take care about it.
You mean, this one? https://openwrt.org/docs/guide-user/installation/sysupgrade.owut
Yes, I have an USB attached, I run a script which collects some hosts files, concat them, store the output on that USB, and symlink it to the router's hosts file.
So, if I am not mistaken, I can install owut on my router, and if I run: owut upgrade -a packageX packageY then will create a system snapshot?
is there a way to specify where to save it? LuCi can save to my Windows machine, can I do this via cli?
No, owut will create sysupgrade file with installed packages.
sysupgrade (also when ran by owut) creates tarball of config files listed via sysupgrade -l and stores it in overlay partition, then after reboot takes it to RAM, formats overlay and restores tarball.
You can add more file paths to /etc/sysupgrade.conf
But external storage will be mounted in same place untouched.
You want owut download to just create the image and plop it into /tmp/firmware.bin. That will contain target- and device-specific firmware with all of your installed packages. It does not contain the configuration backup, for that use sysupgrade --create-backup /tmp/backup.tgz.
I see ... so owut download creates a "snapshot" with all packages installed, and the sysupgrade backup (I think that's similar to the LuCi backup) saves the ''snapshot" config. Is this right?
If yes, if I want to restore, first I have to install the image created by owut download, then load back the config saved by LuCi or by sysupgrade.
Is there a way to specify the owut snapshot output? I think it won't be possible to upload to Windows, but for example to the mounted USB?
You can redirect owut's image save file with the --image option:
$ owut -h
...
-i/--image IMAGE - Image name for download, verify, install and upgrade.
If you want to know the contents of the image, look in the manifest, which is normally beside the image /tmp/firmware.bin at /tmp/firmware-manifest.json.
Thanks for all the help, worked.
I created a backup to the mounted USB and copied it to Windows with WinSCP, did the same with the config backup.
Checked the .json, packages are there.