Operations

Backup

Back up all persistent data without losing secrets, users, or logos.

Back up the complete data store, including accounts, hashes, keys, integrations, pages, history and logos. Archives contain secrets and are not encrypted by NasDash. Protect them and keep a verified copy off the Docker host.

The host-side snapshot and tar commands below require an identity that can read every data file and traverse its directories. The default data directory belongs to UID:GID 1001:1001 with mode 700, so another host user may need elevated execution. Run the backup command with an appropriately privileged identity and keep the resulting archive private; do not loosen data permissions to make a backup.

From the interface

As administrator, open Settings → Tasks and backups. Create, download or delete a backup; automatic backups can be off, daily or weekly, retaining 3–30 automatic archives. Manual backups are not pruned automatically. Archives live in data/backups/ and exclude that backup directory and temporary files. Download them to separate storage. The demo disables these operations. The interface creates backups; restoration is an offline operator procedure.

Offline snapshot tooling

From a product source checkout with Node.js 22, stop the app and use the snapshot tool. It creates a directory containing nasdash-backup.json and data/. The destination must not already exist. Use --source when your actual bind mount differs from the checkout’s default data directory.

umask 077
docker compose stop nasdash
npm run data:backup -- --source ./data --output ./backups/nasdash-snapshot
docker compose start nasdash

Raw folder archive

A raw archive has a different layout from a NasDash snapshot. Record its format and restore it using the matching restore procedure. Keep the same secret configuration: adding or changing NASDASH_JWT_SECRET after encryption can make saved credentials unreadable. Otherwise preserve both jwt.secret and encryption.key.

umask 077
mkdir -p backups
docker compose stop nasdash
tar -czf backups/nasdash-data-backup.tar.gz -C data .
docker compose start nasdash

Named volume

Only use this command when the running stack actually mounts nasdash-data; it does not back up a ./data bind mount. Stop writes, then inspect the archive and test restoration on isolated storage. Never use docker compose down -v for an update.

umask 077
mkdir -p backups
docker compose -f docker-compose.named-volume.yml stop nasdash
docker run --rm \
  --volume nasdash-data:/source:ro \
  --volume "$PWD/backups:/backup" \
  alpine sh -c 'umask 077; tar -czf /backup/nasdash-data-backup.tar.gz -C /source .'
docker compose -f docker-compose.named-volume.yml start nasdash