Backup & Restore¶
WAMF stores its persistent state in three directories:
A complete WAMF backup should include all three.
What to Back Up¶
Configuration¶
The config/ directory contains the WAMF configuration and authentication settings.
Back up the entire directory:
Database¶
The data/ directory contains the WAMF observation database.
Back up the entire directory:
The database contains WAMF observation history and should be included in every complete backup.
Archived Media¶
The media/ directory contains media archived by WAMF.
Back up:
The size of this directory will depend on the number of observations and your media retention settings.
Frigate recordings and other media managed directly by Frigate are separate from the WAMF backup.
Creating a Consistent Backup¶
For the most consistent backup, stop WAMF before copying its persistent directories.
For Docker Compose:
Copy or archive:
Then start WAMF again:
For Portainer deployments, stop the WAMF container or stack before taking the backup and start it again afterwards.
Example Backup¶
If WAMF is installed in ~/WAMF, a simple archive can be created with:
Store the resulting archive somewhere outside the WAMF host if it is intended to protect against disk or host failure.
Restoring a Backup¶
Stop WAMF before restoring persistent data.
Restore the backed-up directories to the paths used by your WAMF deployment:
Ensure that the Docker bind mounts or Portainer stack point to the restored directories.
Then start WAMF.
For Docker Compose:
Verify the Restore¶
After restoring a backup:
- Open the WAMF web interface.
- Confirm that WAMF starts normally.
- Check the system health information.
- Confirm that existing observations are present.
- Check that archived media is available.
- Confirm that WAMF reconnects to MQTT and Frigate.
- Verify that a new detection can be processed.
File Ownership¶
WAMF v0.4.0 currently runs as root inside the Docker container.
Files created in bind-mounted config, data and media directories may therefore be owned by root on the Docker host.
When restoring or manually copying WAMF data, ensure that the files remain accessible to the container.
Avoid changing permissions or ownership unnecessarily if the restored installation is already working.
Before an Update¶
A complete backup of:
is recommended before updating WAMF to another release.
Keep the backup until the updated installation has been verified successfully.
See Updating WAMF for the update procedure.