Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:troubleshooting:backup_restore [2019/10/31 07:43] – SSH server - OpenWrt, SSH client - PC, but if you configure the server on the PC, you can run scp on the router as well vgaetera | docs:guide-user:troubleshooting:backup_restore [2023/01/17 10:56] – [Introduction] vgaetera | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ===== Introduction ===== | ===== Introduction ===== | ||
| - | * This how-to describes the method for performing | + | * This how-to describes the method for using OpenWrt file-level backup/ |
| + | * Follow [[docs: | ||
| * Follow [[docs: | * Follow [[docs: | ||
| - | * Follow [[docs: | ||
| * Follow [[docs: | * Follow [[docs: | ||
| + | * Extroot or additional overlay setups require extra measures. | ||
| ===== Goals ===== | ===== Goals ===== | ||
| - | * Provide an easy way to restore OpenWrt | + | * Back up and restore OpenWrt configuration. |
| - | ===== Web interface ===== | + | ===== Web interface |
| ==== 1. Customize and verify ==== | ==== 1. Customize and verify ==== | ||
| Customize your backup configuration. | Customize your backup configuration. | ||
| - | - Navigate to **[[http:// | + | - Navigate to **LuCI -> System -> Backup / Flash Firmware -> Configuration**. |
| - Add/remove files/ | - Add/remove files/ | ||
| - | - Click **Open list...** button to view the list files for backup. | + | - Click **Open list...** button to view the list of files for backup. |
| Make sure the list contains all the files you want to save. | Make sure the list contains all the files you want to save. | ||
| ==== 2. Back up ==== | ==== 2. Back up ==== | ||
| Back up OpenWrt configuration to local PC. | Back up OpenWrt configuration to local PC. | ||
| - | - Navigate to **[[http:// | + | - Navigate to **LuCI -> System -> Backup / Flash Firmware -> Actions: Backup**. |
| - Click **Generate archive** button to download the archive. | - Click **Generate archive** button to download the archive. | ||
| ==== 3. Restore ==== | ==== 3. Restore ==== | ||
| Restore previously saved OpenWrt configuration from local PC. | Restore previously saved OpenWrt configuration from local PC. | ||
| - | - Navigate to **[[http:// | + | - Navigate to **LuCI -> System -> Backup / Flash Firmware -> Actions: Restore**. |
| - Click **Choose File** button to select the archive. | - Click **Choose File** button to select the archive. | ||
| - Click **Upload archive...** button to upload the archive. | - Click **Upload archive...** button to upload the archive. | ||
| - | ===== Command-line | + | ===== Command-line |
| - | OpenWrt provides [[docs: | + | OpenWrt provides [[docs: |
| ==== 1. Customize and verify ==== | ==== 1. Customize and verify ==== | ||
| Line 40: | Line 41: | ||
| cat << EOF >> / | cat << EOF >> / | ||
| / | / | ||
| - | / | + | / |
| EOF | EOF | ||
| Line 55: | Line 56: | ||
| <code bash> | <code bash> | ||
| # Generate backup | # Generate backup | ||
| + | umask go= | ||
| sysupgrade -b / | sysupgrade -b / | ||
| ls / | ls / | ||
| Line 64: | Line 66: | ||
| ==== 3. Restore ==== | ==== 3. Restore ==== | ||
| Restore previously saved OpenWrt configuration from local PC. | Restore previously saved OpenWrt configuration from local PC. | ||
| + | Reboot to apply changes. | ||
| <code bash> | <code bash> | ||
| Line 72: | Line 75: | ||
| ls / | ls / | ||
| sysupgrade -r / | sysupgrade -r / | ||
| + | reboot | ||
| + | </ | ||
| + | |||
| + | ===== Extras ===== | ||
| + | ==== Backup settings ==== | ||
| + | Backup combines multiple sources and covers most configurations by default. | ||
| + | |||
| + | <code bash> | ||
| + | # Automatically detected modifications | ||
| + | opkg list-changed-conffiles | ||
| + | |||
| + | # System configurations supplied by individual packages | ||
| + | grep -r -e . / | ||
| + | |||
| + | # User configuration to edit if necessary | ||
| + | grep -e . / | ||
| + | |||
| + | # Obsolete settings no longer supported | ||
| + | uci show luci.flash_keep | ||
| </ | </ | ||