Backup & Recovery
Two different kinds of backups are possible.
Backup: A backup that stores all relevant user data like media files, scripts, databases, etc.
settings.json: The configuration file is the core element in every installation of IP-Symcon. The file is saved automatically.
A backup will include all relevant user data. A complete backup is not done automatically.
Creating and loading a backup is explained in Create Backup and Load Backup.
Automatical backup of the configuration file (settings.json)
The file "settings.json" in the IP-Symcon folder contains all relevant settings of IP-Symcon. The file is the core element of the configuration. A copy of the file is stored in the folder "backup" every day at 0:00 and can be accessed in case of an error. A maximum of 25 files are stored in the folder. When the limit is exceeded, the oldest file is deleted.
The backup of the file is automatically stored with the name "settings1234567890.json", where "1234567890" is replaced with the current Unix timestamp. Thus, the highest number corresponds to the most current backup.
The automatical backup of the configuration file does not replace a regular complete backup. See Create backup
Restore configuration file (settings.json) in case of an error
Different circumstances can cause errors, e.g.:
- Unwanted modifications (e.g., wrong instances, deleted variables, ...)
- The settings are unexpectedly "lost", "deleted", or "empty". (In most cases, this is caused by an unexpected termination of the software, e.g., in case of a power outage)
To restore the configuration file the following steps are necessary:
- Terminate the IP-Symcon service
- Copy any "settings1234567890.json" from the folder "backup" into the main folder (e.g., the file with the highest number in the file name)
- Delete the current "settings.json"
- Rename the copied "settings1234567890.json" into "settings.json"
- Start the IP-Symcon service again
If the chosen backup of the configuration file does not work, try another backup. If no backup works, ask for help in the forum. When you ask for help, you need to attach at least one logfile. Posts without logfiles cannot be processed.
How often is a backup file written?
Since version 4.0, IP-Symcon has various mechanisms to minimize the write cycles.
This is required if the IP-Symcon is operated on storage media that are showing signs of wear.
This is the case, for example, with a Raspberry Pi with an SD card.
Media and settings.json
In general, the settings.json is saved cyclically every 10 minutes (see special switch) and when the service starts/stops.
Media files (e.g. from Image Grabber) are cached and are only written at start/stop.
Variable Raw Data and Aggregation
IP-Symcon writes variable raw data, which is saved in the archive, to the hard disk every minute. Since these are constantly growing datasets this is intended. In turn, the aggregation data is only written if an aggregation period is complete. The respective incomplete aggregation periods are restored at startup from the variable raw data. For this reason, starting with many archived variables also takes a little longer.
Log files, which cause the majority of write cycles, are handled differently depending on the system. Normally these end up on the hard drive. However, the SymOS on the SymBox maps /var/log/symcon to a RAM drive, which means that the storage medium is not worn out unnecessarily and the longevity is extended.