Show pagesourceOld revisionsBacklinksBack to top × Table of Contents Backup and restore Introduction Goals Web interface 1. Customize and verify 2. Back up 3. Restore Command-line interface 1. Customize and verify 2. Back up 3. Restore Backup and restore This article relies on the following: Accessing OpenWrt WebUI Accessing OpenWrt CLI Introduction This how-to describes the method for performing OpenWrt file-level backup/restore. Follow Preserving configuration to determine whether to keep the settings. Follow Firmware upgrade to identify manually installed packages. Follow Generic backup for block-level backup/restore. Goals Provide an easy way to restore OpenWrt to the previous configuration state. Web interface 1. Customize and verify Customize your backup configuration. Navigate to LuCI → System → Backup / Flash Firmware → Configuration. Add/remove files/directories and click Submit when done editing. Click Open list… button to view the list of files for backup. Make sure the list contains all the files you want to save. 2. Back up Back up OpenWrt configuration to local PC. Navigate to LuCI → System → Backup / Flash Firmware → Actions: Backup. Click Generate archive button to download the archive. 3. Restore Restore previously saved OpenWrt configuration from local PC. Navigate to LuCI → System → Backup / Flash Firmware → Actions: Restore. Click Choose File button to select the archive. Click Upload archive… button to upload the archive. Command-line interface OpenWrt provides sysupgrade utility for file-level backup/restore. 1. Customize and verify Customize and verify your backup configuration. # Add files/directories cat << EOF >> /etc/sysupgrade.conf /etc/sudoers /etc/sudoers.d/ EOF # Edit backup configuration vi /etc/sysupgrade.conf # Verify backup configuration sysupgrade -l 2. Back up Back up OpenWrt configuration to local PC. # Generate backup umask go= sysupgrade -b /tmp/backup-${HOSTNAME}-$(date +%F).tar.gz ls /tmp/backup-*.tar.gz # Download backup scp root@openwrt.lan:/tmp/backup-*.tar.gz . 3. Restore Restore previously saved OpenWrt configuration from local PC. # Upload backup scp backup-*.tar.gz root@openwrt.lan:/tmp # Restore backup ls /tmp/backup-*.tar.gz sysupgrade -r /tmp/backup-*.tar.gz This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.OKMore information about cookies Last modified: 2021/01/20 08:05by vgaetera