Backing up a complete OpenWrt snapshot

Hello, I have compiled custom firmware versions for several of my routers. Each router is already running OpenWrt in some previous version, but I'd like to update them. However, I am a bit worried about bricking the routers or ending up in some state when things don't work smoothly as they are currently. Possible snags: package version discrepancies and config files, incompatibilities in support libraries or APIs, etc. So here's my question.

Is it possible to make a complete snapshot (software, config files and everything else) of a running system that can be flashed back to get it back to where it is now in case things go south? How do I go about creating the snapshot? How can I restore it if I need to after things go wrong?

Forum note: Before posting this question, I searched for previous posts and a thread emerged ( Complete backup of system ), but when I tried to reply there, the system warned me I was resurrecting an old discussion and advised that I post a new thread instead - that's why I'm creating a new thread for 2023.

1 Like

You have the firmware. :+1:

  1. Re-flash custom firmware
  2. Use backup config - see:

:warning: (Copying/restoring a whole image of the flash chip can cause damage.)


Apart from the inherent dangers of trying to restore a block image on NAND devices (never do that!), trying to back up a full disk image is always a risky process, bypassing all of the usual sanity checks - it's very easy to hard-brick your device that way.

Use the normal processes (sysupgrade & config backups <-- test it, make sure that the config backup contains everything you do need to retain, before promoting it into production services), don't try to be smarter than that, chances are high that you'd lose out.


Thanks to both posters for your help!

I will avoid trying to be "smarter than that" all right :slight_smile:, as @slh put it.

Both of you are saying basically the same thing in different ways. I'm marking @lleachii 's reply as a solution because it came first.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.