This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki:features [2018/08/31 10:42] ghi [Backup restore] |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Recovery mode & backup features ====== | ||
- | ===== Recovery ===== | ||
- | ==== Instability detection ==== | ||
- | |||
- | An instability counter is used to detect system instability. | ||
- | * If 16 consecutive reboots are detected due to a watchdog, a “backup restore” operation is triggered. | ||
- | * If 32 consecutive reboots are detected due to a watchdog, a “stock restore” operation is triggered. | ||
- | |||
- | The counter is reset if the system is up during at least 10 minutes. | ||
- | This feature cannot be disabled as it avoids bricking the gateway in case of software failure. | ||
- | |||
- | The counter ''bootfail'' is displayed at boot time only if the reboot is due to a watchdog. Bootcause information are available [[wiki:troubleshoot#bootcause|here]]. | ||
- | |||
- | <code> | ||
- | U-Boot 2015.04 (Aug 21 2018 - 18:53:11) | ||
- | |||
- | CPU: Freescale i.MX6SX rev1.2 at 792 MHz | ||
- | CPU: Temperature 48 C | ||
- | Reset cause: WDOG | ||
- | Watchdog enabled | ||
- | I2C: ready | ||
- | DRAM: 240 MiB | ||
- | MMC: FSL_SDHC: 0 | ||
- | Using default environment | ||
- | |||
- | In: serial | ||
- | Out: serial | ||
- | Err: serial | ||
- | bootcause = SW | ||
- | bootcount = 32 | ||
- | bootfail = 0 | ||
- | bootmode = nominal | ||
- | boardconfig = 0x0 | ||
- | Net: FEC0 | ||
- | Normal Boot | ||
- | </code> | ||
- | |||
- | \\ \\ | ||
- | ===== Backup ===== | ||
- | ==== Backup restore ==== | ||
- | The updates that are being installed during an update request can make the system unstable so by default they are not included immediately in the backup.\\ | ||
- | Before each update, a “snapshot” of the firmware is done. It contains all the previously applied updates that are considered as "stable". | ||
- | This “snapshot” will be used if a “backup restore” is triggered. \\ | ||
- | If a “backup recovery” is triggered, only the stable updates are restored. Other updates are destroyed. \\ | ||
- | |||
- | Modifications in rootfs will be lost except [[wiki:upgrade#configuration_management_sysupgrade|system upgrade]] files. | ||
- | |||
- | This mecanism is divided in 2 elements: | ||
- | |||
- | * ''/etc/sysupgrade.conf'': Contains the system (KerOS) elements to backup/restore. | ||
- | * ''/etc/sysupgrade.d/'': a directory with .conf files where additional elements to backup/restore can be added (i.e. by additional packages). | ||
- | |||
- | By default, some system configuration files are backed up like the network configuration. | ||
- | |||
- | |||
- | To trigger a backup restore execute the following commands: | ||
- | <code bash> | ||
- | kerosd -b | ||
- | reboot | ||
- | </code> | ||
- | |||
- | \\ | ||
- | ==== Stock restore ==== | ||
- | The stock firmware is backuped at production time (or when updated with a KerOS liveburner.ipk file). \\ | ||
- | A “stock restore” will factory reset the station. All data will be lost. | ||
- | To trigger a stock restore execute the following commands: | ||
- | <code bash> | ||
- | kerosd -s | ||
- | reboot | ||
- | </code> | ||
- | |||
- | |||
- | ===== Store & Restore configuration ===== | ||
- | |||
- | This functionality from firmware < 4.0 must not be used to store configuration files. In order to save configuration use the [[wiki:upgrade#configuration_management_sysupgrade|sysupgrade]] management. |