I was Googling for a solution to making a complete backup of the system, so that one can get back to exactly the same point. I found this – is this still the way, or is there a more streamlined way?
If you mean the option under System > Backup/Restore, yes – but since it only creates a very small file (~6kB), I assume it only contains certain configurations. I would like a backup that when restored puts the system in exactly the same state as at the time of backup, including all extra packages, scripts etc.
Since also doing a firmware upgrade erases packages I've always used the Image Builder https://openwrt.org/docs/guide-user/additional-software/imagebuilder to make a full firmware image with all packages included, and at that point the only thing I need to backup/restore is the config files, which are handled by default Luci/OpenWrt backup system.
Just use imagebuilder (online) to get your firmware including all needed packages. And use the normal backup function. If you need some special files include them fia the config.
Yes DO NOT directly copy and restore mtd partitions on a device with NAND flash, that will brick it. On most routers with NOR flash you can make an image to clone or restore the installation with a copy of the "firmware" partition (which is an alias for kernel + rootfs + rootfs_data). Install this file with sysupgrade -n.
OpenWrt does not alter the bootloader, factory, or ART partitions so there is no need to restore those. Writing to these partitions can result in loss of unit-specific factory data that is difficult or impossible to recover.
Thanks to everyone. I have now found and read a number of instructive pieces that I recommend to anyone with the same question:
– and particularly
Between all of these, I think I'll figure out what works for me. I have already installed opkg extras and ensured that I extended the list of directories and files to be backed up; this made me understand why my backup file (with default settings) was so small.