Backup, Update & Reset
Your data lives in a Docker volume. Here's how to back it up, update the app, and start fresh when needed.
Where your data lives
All data — the SQLite database (pos.db) and the auto-generated JWT signing secret — lives in a Docker named volume called nodedr-pos_data. This is separate from the container filesystem.
This means rebuilding, recreating, or removing containers never touches your data. You can run docker compose down and docker compose up -d any number of times and your products, invoices, customers, and settings are always there. Run docker volume ls to confirm the volume exists.
Backing up your data
Since the volume is managed by Docker, you cannot just copy a folder. Use a throwaway container to extract the database file:
docker run --rm \
-v nodedr-pos_data:/data:ro \
-v "$PWD":/backup \
alpine cp /data/pos.db /backup/pos-backup-$(date +%Y%m%d).dbThis drops a timestamped copy of pos.db in your current directory. The :ro flag mounts the volume read-only — the running app is not affected.
Scheduled backups
To automate backups, add a cron job on the host machine:
# Run daily at 2am, keep 30 days of backups
0 2 * * * docker run --rm -v nodedr-pos_data:/data:ro -v /path/to/backups:/backup alpine sh -c "cp /data/pos.db /backup/pos-backup-\$(date +\%Y\%m\%d).db && find /backup -name 'pos-backup-*.db' -mtime +30 -delete"Restoring from backup
# 1. Stop the stack
docker compose down
# 2. Copy your backup into the volume
docker run --rm \
-v nodedr-pos_data:/data \
-v "$PWD":/backup \
alpine cp /backup/pos-backup-20260720.db /data/pos.db
# 3. Restart
docker compose up -dUpdating to a new version
# From inside your nodedr-pos directory:
git pull
docker compose up -d --buildOr re-run ./install.sh — it does exactly the same thing. Your data in the volume is untouched. The build is cached from the previous run, so only changed layers are rebuilt.
Resetting / clearing data
Full reset (wipe everything)
Removes all data — admin account, shop settings, products, invoices, customers — and returns you to the onboarding wizard.
# Stop the stack AND delete the volume
docker compose down -v
# Start fresh — onboarding runs on first open
docker compose up -d-v flag deletes the nodedr-pos_data volume and all data inside it. Make a backup first if you need to recover anything.Remove volume without stopping containers
# Stop first, then remove the volume
docker compose down
docker volume rm nodedr-pos_dataClear only catalog and sales (keep admin + settings)
There is currently no one-command way to do a partial reset that preserves admin credentials and shop settings. To do this, delete products and invoices from within the app (Inventory → delete products, Sales → History → delete individual invoices) or connect to the SQLite database directly and truncate specific tables.
Connecting to the database directly
# Start a shell in a container with the volume mounted
docker run --rm -it \
-v nodedr-pos_data:/data \
alpine sh
# Inside the container, install sqlite3 and open the database
apk add sqlite
sqlite3 /data/pos.db
# Useful SQLite commands:
.tables -- list all tables
.schema Invoice -- show table schema
SELECT COUNT(*) FROM Invoice;
.quit