List the files before creating the archive
In LuCI, open Status → Overview and record the model, hardware revision and release. In an SSH session on the router, ubus call system board also reports model, board_name, release.version and release.target. Save these details to help judge whether the old network configuration suits the target hardware and release.
OpenWrt builds the archive from a file list. Network, wireless and firewall settings under /etc/config/ are usually included. Run sysupgrade -l to see the list on your router. Record the names of extra packages separately, and back up shared files or databases on external storage with their own tools. If a custom script is missing, add its path to /etc/sysupgrade.conf and check the list again. OpenWrt backup and restore documentation
Download an archive with LuCI
- Sign in to LuCI and open System → Backup / Flash Firmware.
- Under Backup, choose Generate archive. Save the downloaded
.tar.gzin a private folder on the computer. Put the device, OpenWrt release and date in its name or an accompanying note. - Inspect the archive's list of filenames on the computer. Look for
etc/config/networkand any custom files you need. Dial-up, Wi-Fi and VPN configuration may contain passwords or private keys. Store the archive as you would those credentials.
Create the archive over SSH and copy it off the router
Run these three lines in an SSH session on the router. The -l option lists the files selected for backup. Review that output first. The -b option creates a configuration archive. sysupgrade option definitions
sysupgrade -l
umask 077
sysupgrade -b /tmp/openwrt-config-backup.tar.gz
Open a separate terminal on the computer in a new, private backup directory. Replace ROUTER_IP below with the current management address. The first command copies the archive over SSH, and the second lists its contents locally. If SCP reports that the SFTP subsystem cannot start on a typical OpenWrt Dropbear setup, try scp -O with the same arguments. Confirm the local copy before rebooting because the router's /tmp is usually in RAM.
scp root@ROUTER_IP:/tmp/openwrt-config-backup.tar.gz .
tar -tzf openwrt-config-backup.tar.gz
Check compatibility before restoring and test the result
- Restoring to the same device. Check the target release notes for configuration compatibility. For a full restore, select the archive under Restore on the same LuCI page and confirm. Connect by Ethernet and note the old LAN address first. The restored settings can change the address you need to sign in.
- Moving to a different model or an incompatible release. Start with the new defaults and use the archive as a reference. Recreate settings individually, especially LAN/WAN port assignments, VLAN device names and wireless interface mappings. Restoring an entire old network setup can leave the new router unreachable.
- After the restore. Sign in at the expected LAN address. Test WAN or PPPoE access, address assignment to Wi-Fi clients, VLANs and VPN connectivity. Reinstall extra packages for the target release and make a fresh backup of the working configuration. OpenWrt installation and recovery guide
Comments