Cloning to a backup linksys e8450 router

we have a linksys e8450 with ver 25.12.4 installed. Thank you to the community for your forum help and documentation. Gemini AI also provided a lot of good information.

Will soon activate this router as the router (#1) for our home. This router came in a 2 pack. Would like to make router 2 a backup by cloning router 1 to router 2.

AI claimed that while using attended sysupgrade one could download the new firmware to your pc to port it to router 2. It seems this will not work till ver 25.12.5 comes out because the sysupgrae says there is no update available.

The configurations look like they will port to router 2 quite easily being configs get nicely backed up by the backup process. That's assuming that configs from router 1 can be restored on router 2.

Is there any way to get the 25.12.4 firmware copied off router 1 so it can be uploaded on router 2 without waiting till a new sub release comes out.

If that would work, new features could be installed on router 2 and then router 2 could be activated as the production router. Then when all is proved to be running well, router 2 could be cloned over to router 1.

Thanks in advance for any help on this.

If you are running the same hardware and same firmware version, then you can indeed restore the backup from one onto the other without issue. That leaves the issue of retrieving the firmware from the current router.

For the easy way, if you set luci-app-attendedsysupgrade to enable advanced features, you can select the current version from the list and have the build server rebuild the image for you. Rather than installing it (once built), you can download it and deploy that sysupgrade image to the other router of the same model. Just don't forget that if the second router is 23.x or older, it cannot directly go to 24.x or newer without the special upgrade package.

If instead you really want to go the hard way and retrieve the working firmware from the current router, you can do this over SSH. The production firmware will be stored in the UBI volume called fit (not to be confused with fip). Using the ubi commands, you can list out the volumes present and retrieve the volume number of the fit volume. The retrieved volume number corresponds to a device that will be accessible via /dev/ubi{volume number}. With the device name identified, you can dd the contents of the image out to a file in the /tmp folder and then scp the file over to your computer. The resulting file should be identical to the sysupgrade file that was applied to the router.

LuCI ASU's initial drop-down for version should show your currently installed version, at least, and if there are newer versions, they should be shown, too. Just do the "Request Firmware Image" and when it's done building, click the "Download firmware image" link on the success dialog.

The configs should be fine. You often have to wipe /etc/config/wireless when you try to do this between different hardware devices, but in your case they are identical, so should work without issue.

Aha! I had forgotten about that...

Actually, it is not recommended to "clone" the configuration between devices, even when essentially identical.

There are multiple things that can get you into trouble with respect to cloning the conifgs:

  • MAC addresses (both wired and wireless) must never be duplicated across device on the same network
  • IP addresses must also not be duplicated
  • Wireless radios should be on different (non-overlapping) channels for each AP.
  • DHCP server(s) on secondary devices must be disabled.

Beyond that, yes, you can use the same firmware image (including customizations) to flash the same model devices, but the configs, as I described above, should not usually be 'cloned'. Aside from what I mentioned already, usually, the main router and secondary devices serve different purposes -- typically the secondary devices are bridged-APs and don't perform any routing. Therefore, additional packages installed on the main router may not be useful on the APs (but as long as they don't have clashing configs, it shouldn't cause problems).

Thanks for the response. I have no intention of having both routers conflicting with each other. When it is time to do the clone work, I plan to have the production "from router" r1 be turned off and the "to router" r2 sitting next to my easy chair with an ethernet connection to my pc. After r2 is cloned, it would be turned off. Quietly waiting to be put into production of r1 failed.

When it is time to try a new feature (like encrypted dns) r1 could be turned off for a few minutes and r2 could be changed to 192.168.4.1 and its ssid's changed to different names. R2's wan port could be connected to one of r1's lan ports and testing and installation of additional software could be done.

After adequate testing, r1 could be turned off and r2 could be put into production. If r2 has issues running production, r1 would be there to go back to.

After r2 proves itself, it could be cloned over to r1.

If that is you use case, sure. However, keep in mind that "cold spares" quite often just sit there never being used and thus may lag behind drastically in terms of your configs and firmware versions. It's not that they're never useful, but rather that you might find that it makes more sense to put the device to use as a bridged AP (for better wifi coverage) and just have an up-to-date copy of the firmware and configs that you can install at a moment's notice (it only takes a few mins).

But whatever you approach, cloning should probably be okay as long as the devices are never powered on at the same time.

Thank you for that reminder. I also plan to exactly repeat my r1 installation work on r2 getting it to 25.12.4 just as r1 is now.

R1 had 24.10.6 installed first using the special github instructions. Then it was nearly immediately upgraded to 25.10.4. My understanding is that more UBI conversion work was done during the upgrade to 25.10.4.

So I plan to repeat that exact process on r2 before attempting to then clone r1 to r2.

Hoping the UBI conversion processes are all completed on this linksys e8450 hardware. This stuff is difficult to follow.

Thanks for your input. Agreed the "cold spare" will mostly sit there unused. However, having this "cold spare" is pretty cheap insurance. The twin pack is sold as a Linksys E8452. They must have had trouble moving these units when they came out. There are a number of "new" E8452's being sold on Ebay for under $90 shipped.

If the planned maintenance routines are followed the spare will be at the same firmware version most of the time. And if configs are behind a little, a restore of a backup should make it a true clone.

If needed the spare can always be turned into a bridged-AP as was mentioned by psherman.

This does not appear to be a way to get a copy of the firmware off a running system. Here is the reason for the concern:

The original firmware loaded on the router is this size (windows explorer output):
openwrt-25.12.4-mediatek-mt7622-linksys_e8450-ubi-squashfs-sysupgrade.itb 11,029 KB.
The file downloaded by using luci attended sysupgrade is this size (windows explorer output):
openwrt-25.12.4-d2d96e7f403e-mediatek-mt7622-linksys_e8450-ubi-squashfs-sysupgrade.itb 24,197 KB.
The UBI file 5 is closer to the original firmware file:
ubinfo -a

Volume ID: 5 (on ubi0)
Type: dynamic
Alignment: 1
Size: 89 LEBs (11300864 bytes, 10.7 MiB)
State: OK
Name: fit
Character device major/minor: 250:6

Ran these commands:
dd if=/dev/ubi0_5 of=/tmp/copyfile
ll /tmp/copyfile
-rw-r--r-- 1 root root 11300864 Jun 8 13:11 /tmp/copyfile

Was the original firmware customized at all, or was it the standard/default image as downloaded from the firmware selector?

Have you installed packages onto the router since you flashed the firmware? If so, OWUT/ASU will provide a monolithic firmware file that contains all the same packages and is thus a larger file than what you had originally.

No additions, this firmware file is straight off the openwrt download site.

What about post-install package installations? Did you add anything?

Yes. Installed a bunch of usb modules, samba modules and not much else, here is what was installed:
apk add block-mount
apk add e2fsprogs
apk add kmod-usb-storage-uas
apk add kmod-fs-vfat
apk add kmod-fs-exfat
apk add luci-app-samba4
the last output line after the samba4 add is this:
OK: 81.7 MiB in 206 packages

One question is whether the firmware file should jump from 11,029 KB, the original firmware file size to 24,197 KB, the size of the file that luci attended sysupgrade created.

It appears the file copied from the UBI fit area is just a bit larger than the original firmware file. 11,300,864 bytes verses 11,029 KB.
11,029 KB calculates to 11,293,696 bytes.

Am leery about either technique giving a file that can be cloned over to a second router while containing the original firmware and package additions done to the source router.

Should the file size jump from 11.029 KB (the original firmware) to 24,197 KB (the luci sysupgrade file)

In running a apk info -s command, I get some errors like this:
WARNING: opening from cache https://downloads.openwrt.org/releases/25.12.4/targets/mediatek/mt7622/packages/packages.adb: No such file or directory

Then names with no size info like this:
kmod-usb-core

Samba is huge. The filesystem kmods not so much.

psherman is pointing you toward the difference here and why the customized and repacked firmware file freshly downloaded from the firmware customizer server is not the same as the firmware file that was actually loaded onto the device. The fit volume contains the actual sysupgrade image file that was installed on the device. Any subsequent add-ons made with opkg/apk/luci are stored within the user data volume as part of the overlay content that sits on top of and works in concert with the firmware image.

Exactly.

$ apk query --format yaml --fields name,file-size 'samba*'
# 5 items
- name: samba4-admin
  file-size: 962874
- name: samba4-client
  file-size: 133382
- name: samba4-libs
  file-size: 9485598     << "There's your problem!"
- name: samba4-server
  file-size: 254741
- name: samba4-utils
  file-size: 34711

And that's without any dependencies...

Thanks for all that have reviewed and all that have reviewed and responded with help to this post!

It is becoming apparent that this cloning desire is a bit more complicated than originally thought. In old fashioned system and database administration a clone implied nearly duplicate file structures and sizes.

Researching this with the help of Gemini AI (hopefully providing good answers) provides the following list of of 3 UBI volumes:

fit, UBI volume 5 contains just the base firmware with no packages, neither standard packages nor those custom added in the past nor added since the router was flashed. After flashing fit is read/only.

rootfs_ubi, UBI volume 6 contains packages that are standard along with all packages added before the router was last flashed. After flashing rootfs_ubi is read/only.

rootfs_data, UBI volume 7 contains packages added since the router was last flashed and also config files. After flashing rootfs_data is read/write.

If these above definitions are accurate and if new packages have been installed since the last flash operation then a new flashing operation will increase the size of roofs_ubi and decrease the size of rootfs_data.

Fit will only change in size if the version being flashed is different. (in a cloning operation it will not change).

In regards to attempting a cloning operation:
It seems the best way is to use luci attended sysupgrade. A setting needs to be changed to allow the process to stay at the same Openwrt version. Do this by selecting the “configuration” button and selecting “Advanced Mode” to put a checkmark on that option. Then return to the “overview” screen and select “search for firmware upgrade”. Go to the bottom of the list and select “request firmware image”. Select “download firmware image” to get the file you your pc.

That created image file can then be flashed on the “clone to” router. The setting “keep settings and retain the current configuration” needs to be selected. When that flashing operation is done, the UBI volumes sizes may be different between the source and destination routers in this way:

If the source router had packages added after it was flashed they will exist on the source in rootfs_data UBI volume 7 and will end up in rootfs_ubi UBI volume 6 on the destination router. The fit UBI volume 5 will remain the same size.

Plan to do a clone operation to router 2 from router 1 soon. That is after doing initial install work on router 2 in that it is brand new taking it to ver 25.12.4, plain vanilla. That will match the router 1 install completed a couple of weeks ago.

Will plan to watch the UBI volumes change in size during these operations and post back here the results.

Just throw the ai into the bin. Messing with the UBI volumes directly is a recipe for -irrecoverably- disaster, unless you know very-very-very well what you're doing (you don't).

AI likely got that wrong.

At least on my RT3200/E8450 there is no rootfs_ubi. Volume 6 is a backup of the original boot chain, just like Daniel's installation script says... (https://github.com/dangowrt/owrt-ubi-installer/blob/0c4ce31ad4479b4444b1039a230e28b66579993e/files/installer/install.sh#L116 )

From RT3200:

Character device major/minor: 250:5
-----------------------------------
Volume ID:   5 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        185 LEBs (23490560 bytes, 22.4 MiB)
State:       OK
Name:        fit
Character device major/minor: 250:6
-----------------------------------
Volume ID:   6 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        67 LEBs (8507392 bytes, 8.1 MiB)
State:       OK
Name:        boot_backup
Character device major/minor: 250:7
-----------------------------------
Volume ID:   7 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        670 LEBs (85073920 bytes, 81.1 MiB)
State:       OK
Name:        rootfs_data
Character device major/minor: 250:8

Sounds wrong.
As you are flashing a clone firmware image from the other router ("source"), you need to restore that backup made in that "source" router to get the same settings. Preserving the old settings of the cloning target makes no sense, if you actually want the settings from the "source".

The basic plan of using attended sysupgrade in the source router to create a new image with the same packages, and to get that downloaded to PC, sounds ok to em. And create a settings backup file into PC, and restore that in the target router after flashing.

And please keep the exact firmware file that you flash on the PC as a source for the next time.