OpenWrt Forum Archive

Topic: backup firmware ; possible ??

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hello ,

after a lot of time working on my tplink (wr703n), is it possible to make a. bin of my router?

to  flash again it if i make a mistake.

thank you

I don't know but it would be quite useful to be able to do that. Someone will be along to say yes or no.

Other than the possibility of a bin,  the GUI will save the config files from /etc and etc/config but it uses a list so if you have a "foo" in there it won't get saved. You are supposed to be able to re-flash and it keep the config I think. In any case you can put it back with the GUI and I have doen that several times.

As for the rest of the system I have always had a problem in how to backup *nix systems. What you could do is keep a shell script on your PC and every time you opkg install something add the install command line to the script so if you have start again you can run that once re-flashed. You would also need to save any of those package's configs too.

HTH

thank you,,

using  the luci interface backup files ,  this is better than nothing   thanks a lot ;-)

The fast and simple way: In wr703: copy the whole mtd5.
I mean:
cat /dev/mtd5 >/tmp/backup.bin
Download that file to your computer.

That's it. You got the full backup of the firmware (root+rootfs_data).
To restore? Transfer it to /tmp in router.
sysupgrade -v -n backup.bin
(the -n is to not preserve the current config in the router, as you will overwrite it)

I did this 10's of times, always worked.
TIP: Always reboot the router before upgrading, to ensure a clean system.
I got some bricks due the router crashing in the middle of the upgrade, I think it was caused due it had been running for days or weeks and tried to upgrade without rebooting first.

(Last edited by dabyd64 on 17 Mar 2013, 19:39)

Ok..thank you for your reply.  I try it

ok i copied the file by http

opkg update
opkg install uhttpd
uhttpd start

ln -s /tmp/backup.bin /www/backup.bin

and access to via my browser

thank you

/tmp does not survive a reboot (it is RAM).

ln -s /tmp/backup.bin /www/backup.bin

makes a link, it doesn't copy the backup.
Or am I missing something here?

robthebrew wrote:

Or am I missing something here?

thierry69 was using uhttpd to copy backup.bin out of the router, instead of using scp or something similar.

In general it makes no sense to backup the whole firmware if you are using the "normal" squashfs version. You can easily re-flash the same binary firmware that you used originally (as long as you keep a copy of that binary safe), and all your later changes are in /overlay, which is much smaller to backup. Backuping /overlay should be enough for most users.

Personally I am using a self-compiled firmware, so all the packages are already there, and backuping only a few config files from /etc and /etc/config is enough for me.

There is also a handy script to reinstall all the packages after a re-flash, in case you need to do that. The script stores the install list in /etc/config so that it gets included in the config file backup... Read https://forum.openwrt.org/viewtopic.php … 78#p194478

(Last edited by hnyman on 24 Mar 2013, 16:03)

phuque99 wrote:
robthebrew wrote:

Or am I missing something here?

thierry69 was using uhttpd to copy backup.bin out of the router, instead of using scp or something similar.

yes it's the easy way for me to backup my installation , because i am not a specialist of linux and i do lot of  crach system  hmm

The discussion might have continued from here.