5.3 KiB
Executable File
Backing Things Up
Note
To back up 99% of your configuration, back up at least the
/app/configfolder. Database definitions can change between releases, so the safest method is to restore backups using the same app version they were taken from, then upgrade incrementally.
What to Back Up
There are four key artifacts you can use to back up your NetAlertX configuration:
| File | Description | Limitations |
|---|---|---|
/db/app.db |
The application database | Might be in an uncommitted state or corrupted |
/config/app.conf |
Configuration file | Can be overridden using the APP_CONF_OVERRIDE variable |
/config/devices.csv |
CSV file containing device data | Does not include historical data |
/config/workflows.json |
JSON file containing your workflows | N/A |
Where the Data Lives
Understanding where your data is stored helps you plan your backup strategy.
Core Configuration
Stored in /app/config/app.conf.
This includes settings for:
- Notifications
- Scanning
- Scheduled maintenance
- UI preferences
(See Settings System for details.)
Device Data
Stored in /app/config/devices_<timestamp>.csv or /app/config/devices.csv, created by the CSV Backup CSVBCKP Plugin.
Contains:
- Device names, icons, and categories
- Network configuration
- Custom properties
Historical Data
Stored in /app/db/app.db (see Database Overview).
Contains:
- Plugin data and historical entries
- Event and notification history
- Device presence history
Backup Strategies
The safest approach is to back up both the /db and /config folders regularly. Tools like Kopia make this simple and efficient.
If you can only keep a few files, prioritize:
- The latest
devices_<timestamp>.csvordevices.csv app.confworkflows.json
You can also download the app.conf and devices.csv files from the Maintenance section:
Scenario 1: Full Backup and Restore
Goal: Full recovery of your configuration and data.
💾 What to Back Up
/app/db/app.db(uncorrupted)/app/config/app.conf/app/config/workflows.json
📥 How to Restore
Map these files into your container as described in the Setup documentation.
Scenario 2: Corrupted Database
Goal: Recover configuration and device data when the database is lost or corrupted.
💾 What to Back Up
/app/config/app.conf/app/config/workflows.json/app/config/devices_<timestamp>.csv(rename todevices.csvduring restore)
📥 How to Restore
- Copy
app.confandworkflows.jsoninto/app/config/ - Rename and place
devices_<timestamp>.csv→/app/config/devices.csv - Restore via the Maintenance section under Devices → Bulk Editing
This recovers nearly all configuration, workflows, and device metadata.
Docker-Based Backup and Restore
For users running NetAlertX via Docker, you can back up or restore directly from your host system — a convenient and scriptable option.
Full Backup (File-Level)
-
Stop the container:
docker stop netalertx -
Create a compressed archive of your configuration and database volumes:
docker run --rm -v local_path/config:/config -v local_path/db:/db alpine tar -cz /config /db > netalertx-backup.tar.gz -
Restart the container:
docker start netalertx
Restore from Backup
-
Stop the container:
docker stop netalertx -
Restore from your backup file:
docker run --rm -i -v local_path/config:/config -v local_path/db:/db alpine tar -C / -xz < netalertx-backup.tar.gz -
Restart the container:
docker start netalertx
This approach uses a temporary, minimal
alpinecontainer to access Docker-managed volumes. Thetarcommand creates or extracts an archive directly from your host’s filesystem, making it fast, clean, and reliable for both automation and manual recovery.
Summary
- Back up
/app/configfor configuration and devices;/app/dbfor history - Keep regular backups, especially before upgrades
- For Docker setups, use the lightweight
alpine-based backup method for consistency and portability
