Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:troubleshooting:backup_restore [2019/04/19 18:17] – links optimized vgaeteradocs:guide-user:troubleshooting:backup_restore [2023/01/17 10:56] – [Introduction] vgaetera
Line 1: Line 1:
 ====== Backup and restore ====== ====== Backup and restore ======
-{{page>meta:infobox:basic_access&noheader&nofooter&noeditbtn}}+{{section>meta:infobox:howto_links#basic_skills&noheader&nofooter&noeditbutton}}
  
 ===== Introduction ===== ===== Introduction =====
-  * This guide describes file-level backup/restore procedure for OpenWrt via WebUI or CLI+  * This how-to describes the method for using OpenWrt file-level backup/restore. 
-  * Follow [[docs:guide-user:installation:generic.sysupgrade|Firmware upgrade]] to identify manually installed packages.+  * Follow [[docs:guide-user:installation:sysupgrade.packages|Preserving packages]] to back up user-removed/installed packages
 +  * Follow [[docs:guide-quick-start:admingui_sysupgrade_keepsettings|Preserving configuration]] to determine whether to keep the settings.
   * Follow [[docs:guide-user:installation:generic.backup|Generic backup]] for block-level backup/restore.   * Follow [[docs:guide-user:installation:generic.backup|Generic backup]] for block-level backup/restore.
 +  * Extroot or additional overlay setups require extra measures.
  
 ===== Goals ===== ===== Goals =====
-  * Provide an easy way to restore OpenWrt to the previous configuration state.+  * Back up and restore OpenWrt configuration.
  
-===== Web interface =====+===== Web interface instructions =====
 ==== 1. Customize and verify ==== ==== 1. Customize and verify ====
 Customize your backup configuration. Customize your backup configuration.
-  - Navigate to **[[http://openwrt.lan/|LuCI]] -> System -> Backup / Flash Firmware -> Configuration**.+  - Navigate to **LuCI -> System -> Backup / Flash Firmware -> Configuration**.
   - Add/remove files/directories and click **Submit** when done editing.   - Add/remove files/directories and click **Submit** when done editing.
-  - 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://openwrt.lan/|LuCI]] -> System -> Backup / Flash Firmware -> Actions: Backup**.+  - 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://openwrt.lan/|LuCI]] -> System -> Backup / Flash Firmware -> Actions: Restore**.+  - 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 interface ===== +===== Command-line instructions ===== 
-OpenWrt provides [[docs:techref:sysupgrade|sysupgrade]] utility for file-level backup/restore.+OpenWrt provides [[docs:techref:sysupgrade|Sysupgrade]] utility for file-level backup/restore.
  
 ==== 1. Customize and verify ==== ==== 1. Customize and verify ====
Line 39: Line 41:
 cat << EOF >> /etc/sysupgrade.conf cat << EOF >> /etc/sysupgrade.conf
 /etc/sudoers /etc/sudoers
-/etc/sudoers.d/+/etc/sudoers.d
 EOF EOF
  
Line 54: Line 56:
 <code bash> <code bash>
 # Generate backup # Generate backup
 +umask go=
 sysupgrade -b /tmp/backup-${HOSTNAME}-$(date +%F).tar.gz sysupgrade -b /tmp/backup-${HOSTNAME}-$(date +%F).tar.gz
 ls /tmp/backup-*.tar.gz ls /tmp/backup-*.tar.gz
Line 63: 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 71: Line 75:
 ls /tmp/backup-*.tar.gz ls /tmp/backup-*.tar.gz
 sysupgrade -r /tmp/backup-*.tar.gz sysupgrade -r /tmp/backup-*.tar.gz
 +reboot
 </code> </code>
  
-See also: [[docs:guide-quick-start:admingui_sysupgrade_keepsettings|Preserving configuration]]+===== Extras ===== 
 +==== Backup settings ==== 
 +Backup combines multiple sources and covers most configurations by default.
  
-{{tag>How-to Backup}}+<code bash> 
 +# Automatically detected modifications 
 +opkg list-changed-conffiles 
 + 
 +# System configurations supplied by individual packages 
 +grep -r -e . /lib/upgrade/keep.d 
 + 
 +# User configuration to edit if necessary 
 +grep -e . /etc/sysupgrade.conf 
 + 
 +# Obsolete settings no longer supported 
 +uci show luci.flash_keep 
 +</code>
  
  • Last modified: 2024/04/28 11:01
  • by silejonu