OpenWrt Forum Archive

Topic: Copying complete setup between two openwrt routers

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

I've just been having a lot of fun configuring a LinkSys WRT54GL with Kamikaze 7.09, xwrt, and a particular setup for the VLANs (each port is on a different VLAN for different purposes).  I haven't yet tested it live, but it is all working as hoped in my test network.  It's nice to work with such a flexible firewall/router rather than the default LinkSys firmware.

Anyway, once I've got this setup complete, I've got to do the same thing on two other WRT54GL's - they should be configured the same way, except for some minor details like the passwords.  Is there any convenient way to do this?  Perhaps using "mtd" to get a complete dump of the flash, and using that directly on the other two boxes?  I've kept a list of the packages I've installed, and the changes I've made to the files, but I'm hoping there's a faster and less error-prone way to do the copying.

mvh.,

David

There may be built-in functionality for this, if so then somebody else should answer you. I imagine that a simple way to do what you want is to make a copy of flash content on your PC using, e.g. rsync and ssh. Install the same .bin file on the new router, and get ssh working telneting in, and then sync it with your copy using rsync and ssh from your PC to the router. Shouldn't be too cumbersome, and it makes sense to me to use standard tools like rsync and ssh since it comes handy in general.

Yes, I've thought of doing something like that.  In particular, I planned to scp the files that had bigger changes.  rsync might make it a little easier, however - thanks for the idea.

Many thanks - sorry for not searching well enough before posting.

Will the same set work for Kamikaze - the thread you linked is for White Russian?

DavidBrown wrote:

Will the same set work for Kamikaze - the thread you linked is for White Russian?

yes, that should work

I followed the instructions given in http://forum.openwrt.org/viewtopic.php?id=9122 (reproduced below for convenience) to do the backup - I'll try the restore tomorrow when I get another router.  I'm a little confused as to why only blocks 1 and 3 are needed in the backup - does the jffs block (and block 2) not also need backup?  Or does block 1 contain these two (in the same way that an extended partition contains logical partitions on a hard disk)?  "cat /proc/mtd" shows the blocks, but not any hierarchical information.

mvh.,

David




BACKUP

mount -o remount,ro /dev/mtdblock/4 /jffs
dd if=/dev/mtdblock/1 > /tmp/wrt-linux.trx
mount -o remount,rw /dev/mtdblock/4 /jffs
dd if=/dev/mtdblock/3 > /tmp/wrt-nvram.bin

----------------------------------
RESTORE

dd if=/tmp/wrt-nvram.bin of=/dev/mtdblock/3
mount -o remount,ro /dev/mtdblock/4 /
mtd -r write /tmp/wrt-linux.trx linux

The discussion might have continued from here.