Full Backup With custom changes

Hi Everyone,

Can anyone tell me how do we do (step-by-step) a full backup, with all custom´s change and installed (not native/firmware) software?

There is a simple process?
Thank you.

It depends. What I tend to do after installing a new snapshot/update (with the option enabled to keep the existing configuration), is to first install all additional packages (opkg update ; opkg install ${my list of packages}) and then simply make a full copy of the overlay directory. Together with the sysupgrade image I used to upgrade I have a full backup. To restore I would first install the sysupgrade image again, and then copy the content of the saver overlay folder back to the router and reboot.
Please note that I do not copy the saved copy back to the overlay directory, but rather copy the data inside that folder to the matching folder of the router's filesystem, so backup/overlay/upper/etc would go to /etc on the router.

If it's NOR flash, and will be copied back to the same router or another one of the exact same model(*), you can export the entire firmware image-- which includes the OS ROM, any installed packages, and any other changed files. That file should be called a snapshot or a clone rather than a backup. Unlike using a backup tarball, there isn't a direct way to inspect the contents.

cat /proc/mtd, identify the number of the partition called "firmware", remember it as "N". cat /dev/mtdN > /tmp/firmware.bin. scp the resulting file to a safe place.

The resulting file can be re-installed with sysupgrade -F -n.

Again this method will NOT work on NAND flash. If you aren't sure of the difference, don't try it.

  • This is probably the safest way to upgrade a remote router. Have another one of the same model at home, build it out how it needs to be in the field, then clone it and flash the clone file on the remote.
1 Like

Thank you all. I will try your sugest.