Migration Guide
This guide explains how to upgrade between versions of duplistatus. Migrations are automatic—the database schema updates itself when you start a new version.
Manual steps are only required if you have customised notification templates (version 0.8.x changed template variables) or external API integrations that need updating (version 0.7.x changed API field names, version 0.9.x requires authentication).
Overview
duplistatus automatically migrates your database schema when upgrading. The system:
- Creates a backup of your database before making changes
- Updates the database schema to the latest version
- Preserves all existing data (servers, backups, configuration)
- Verifies the migration completed successfully
Backing Up Your Database Before Migration
Before upgrading to a new version, it's recommended to create a backup of your database. This ensures you can restore your data if something goes wrong during the migration process.
If You're Running Version 1.2.1 or Later
Use the built-in database backup function:
- Navigate to
Settings → Database Maintenancein the web interface - In the Database Backup section, select a backup format:
- Database File (.db): Binary format - fastest backup, preserves all database structure exactly
- SQL Dump (.sql): Text format - human-readable SQL statements
- Click
Download Backup - The backup file will be downloaded to your computer with a timestamped filename
For more details, see the Database Maintenance documentation.
If You're Running a Version Before 1.2.1
Backup
You must manually back up the database before proceeding. The database file is located at /app/data/backups.db inside the container.
For Linux Users
If you are on Linux, don't worry about spinning up helper containers. You can use the native cp command to extract the database directly from the running container to your host.
Using Docker or Podman:
# Replace 'duplistatus' with your actual container name if different
docker cp duplistatus:/app/data/backups.db ./duplistatus-backup-$(date +%Y%m%d).db
(If using Podman, simply replace docker with podman in the command above.)
For Windows Users
If you are running Docker Desktop on Windows, you have two simple ways to handle this without using the command line:
Option A: Use Docker Desktop (Easiest)
- Open the Docker Desktop Dashboard.
- Go to the Containers tab and click on your duplistatus container.
- Click on the Files tab.
- Navigate to
/app/data/. - Right-click
backups.dband select Save as... to download it to your Windows folders.
Option B: Use PowerShell
If you prefer the terminal, you can use PowerShell to copy the file to your Desktop:
docker cp duplistatus:/app/data/backups.db $HOME\Desktop\duplistatus-backup.db
If You Use Bind Mounts
If you originally set up your container using a bind mount (e.g., you mapped a local folder like /opt/duplistatus to the container), you don't need Docker commands at all. Just copy the file using your file manager:
- Linux:
cp /path/to/your/folder/backups.db ~/backups.db - Windows: Simply copy the file in File Explorer from the folder you designated during setup.
Restoring Your Data
If you need to restore your database from a previous backup, follow the steps below based on your operating system.
Stop the container before restoring the database to prevent file corruption.
For Linux Users
The easiest way to restore is to "push" the backup file back into the container's internal storage path.
Using Docker or Podman:
# stop the container
docker stop duplistatus
# Replace 'duplistatus-backup.db' with your actual backup filename
docker cp ./duplistatus-backup.db duplistatus:/app/data/backups.db
# Restart the container
docker start duplistatus
For Windows Users
If you are using Docker Desktop, you can perform the restore via the GUI or PowerShell.
Option A: Use Docker Desktop (GUI)
- Ensure the duplistatus container is Running (Docker Desktop requires the container to be active to upload files via the GUI).
- Go to the Files tab in your container settings.
- Navigate to
/app/data/. - Right-click the existing backups.db and select Delete.
- Click the Import button (or right-click in the folder area) and select your backup file from your computer.
Rename the imported file to exactly backups.db if it has a timestamp in the name.
Restart the container.
Option B: Use PowerShell
# Copy the file from your Desktop back into the container
docker cp $HOME\Desktop\duplistatus-backup.db duplistatus:/app/data/backups.db
# Restart the container
docker start duplistatus
If You Use Bind Mounts
If you are using a local folder mapped to the container, you don't need any special commands.
- Stop the container.
- Manually copy your backup file into your mapped folder (e.g.,
/opt/duplistatusorC:\duplistatus_data). - Ensure the file is named exactly
backups.db. - Start the container.
If you restore the database manually, you may encounter permission errors.
Check the container logs and adjust the permissions if necessary. See the Troubleshooting section below for more information.
Automatic Migration Process
When you start a new version, migrations run automatically:
- Backup Creation: A timestamped backup is created in your data directory
- Schema Update: Database tables and fields are updated as needed
- Data Migration: All existing data is preserved and migrated
- Verification: Migration success is logged
Monitoring Migration
Check Docker logs to monitor migration progress:
docker logs <container-name>
Look for messages like:
"Found X pending migrations""Running consolidated migration X.0...""Migration X.0 completed successfully""Database backup created: /path/to/backups-copy-YYYY-MM-DDTHH-MM-SS.db""All migrations completed successfully"
Version-Specific Migration Notes
Upgrading to Version 0.9.x or Later (Schema v4.0)
Authentication is now required. All users must log in after upgrading.
What Changes Automatically
- Database schema migrates from v3.1 to v4.0
- New tables created:
users,sessions,audit_log - Default admin account created automatically
- All existing sessions invalidated
What You Must Do
- Log in with default admin credentials:
- Username:
admin - Password:
Duplistatus09
- Username:
- Change the password when prompted (required on first login)
- Create user accounts for other users (Settings → Users)
- Update external API integrations to include authentication (see API Breaking Changes)
- Configure audit log retention if needed (Settings → Audit Log)
If You're Locked Out
Use the admin recovery tool:
docker exec -it duplistatus /app/admin-recovery admin NewPassword123
See Admin Recovery Guide for details.
Upgrading to Version 0.8.x
What Changes Automatically
- Database schema updated to v3.1
- Master key generated for encryption (stored in
.duplistatus.key) - Sessions invalidated (new CSRF-protected sessions created)
- Passwords encrypted using new system
What You Must Do
- Update notification templates if you customised them:
- Replace
{backup_interval_value}and{backup_interval_type}with{backup_interval} - Default templates are updated automatically
- Replace
Security Notes
- Ensure
.duplistatus.keyfile is backed up (has 0400 permissions) - Sessions expire after 24 hours
Upgrading to Version 0.7.x
What Changes Automatically
machinestable renamed toserversmachine_idfields renamed toserver_id- New fields added:
alias,notes,created_at,updated_at
What You Must Do
- Update external API integrations:
- Change
totalMachines→totalServersin/api/summary - Change
machine→serverin API response objects - Change
backup_types_count→backup_jobs_countin/api/lastbackups/{serverId} - Update endpoint paths from
/api/machines/...to/api/servers/...
- Change
- Update notification templates:
- Replace
{machine_name}with{server_name}
- Replace
See API Breaking Changes for detailed API migration steps.
Post-Migration Checklist
After upgrading, verify:
- All servers appear correctly in the dashboard
- Backup history is complete and accessible
- Notifications work (test NTFY/email)
- External API integrations work (if applicable)
- Settings are accessible and correct
- Overdue monitoring works correctly
- Logged in successfully (0.9.x+)
- Changed default admin password (0.9.x+)
- Created user accounts for other users (0.9.x+)
- Updated external API integrations with authentication (0.9.x+)
Troubleshooting
Migration Fails
- Check disk space (backup requires space)
- Verify write permissions on data directory
- Review container logs for specific errors
- Restore from backup if needed (see Rollback below)
Data Missing After Migration
- Verify backup was created (check data directory)
- Review container logs for backup creation messages
- Check database file integrity
Authentication Issues (0.9.x+)
- Verify default admin account exists (check logs)
- Try default credentials:
admin/Duplistatus09 - Use admin recovery tool if locked out
- Verify
userstable exists in database
API Errors
- Review API Breaking Changes for endpoint updates
- Update external integrations with new field names
- Add authentication to API requests (0.9.x+)
- Test API endpoints after migration
Master Key Issues (0.8.x+)
- Ensure
.duplistatus.keyfile is accessible - Verify file permissions are 0400
- Check container logs for key generation errors
Podman DNS Configuration
If you're using Podman and experiencing network connectivity issues after upgrading, you may need to configure DNS settings for your container. See the DNS configuration section in the installation guide for details.
Rollback Procedure
If you need to rollback to a previous version:
- Stop the container:
docker stop <container-name>(orpodman stop <container-name>) - Find your backup:
- If you created a backup using the web interface (version 1.2.1+), use that downloaded backup file
- If you created a manual volume backup, extract it first
- Automatic migration backups are located in the data directory (timestamped
.dbfiles)
- Restore the database:
- For web interface backups (version 1.2.1+): Use the restore function in
Settings → Database Maintenance(see Database Maintenance) - For manual backups: Replace
backups.dbin your data directory/volume with the backup file
- For web interface backups (version 1.2.1+): Use the restore function in
- Use previous image version: Pull and run the previous container image
- Start the container: Start with the previous version
Rolling back may cause data loss if the newer schema is incompatible with the older version. Always ensure you have a recent backup before attempting rollback.
Troubleshooting Your Restore / Rollback
If the application doesn't start or your data isn't appearing after a restore or rollback, check the following common issues:
1. Database File Permissions (Linux/Podman)
If you restored the file as the root user, the application inside the container might not have permission to read or write to it.
- The Symptom: Logs show "Permission Denied" or "Read-only database."
- The Fix: Reset the permissions of the file inside the container to ensure it is accessible.
# Set ownership (usually UID 1000 or the app user)
docker exec -u 0 duplistatus chown 1000:1000 /app/data/backups.db
# Set read/write permissions
docker exec -u 0 duplistatus chmod 664 /app/data/backups.db
2. Incorrect Filename
The application looks specifically for a file named backups.db.
- The Symptom: The application starts but looks "empty" (like a fresh install).
- The Fix: Check the
/app/data/directory. If your file is namedduplistatus-backup-2024.dbor has a.sqliteextension, the app will ignore it. Use themvcommand or Docker Desktop GUI to rename it exactly tobackups.db.
3. Container Not Restarted
On some systems, using docker cp while the container is running may not immediately "refresh" the application's connection to the database.
- The Fix: Always perform a full restart after a restore:
docker restart duplistatus
4. Database Version Mismatch
If you are restoring a backup from a much newer version of duplistatus into an older version of the app, the database schema might be incompatible.
- The Fix: Always ensure you are running the same (or a newer) version of the duplistatus image as the one that created the backup. Check your version with:
docker inspect duplistatus --format '{{.Config.Image}}'
Database Schema Versions
| Application Version | Schema Version | Key Changes |
|---|---|---|
| 0.6.x and earlier | v1.0 | Initial schema |
| 0.7.x | v2.0, v3.0 | Added configurations, renamed machines → servers |
| 0.8.x | v3.1 | Enhanced backup fields, encryption support |
| 0.9.x, 1.0.x, 1.1.x, 1.2.x, 1.3.x | v4.0 | User access control, authentication, audit logging |
Getting Help
- Documentation: User Guide
- API Reference: API Documentation
- API Changes: API Breaking Changes
- Release Notes: Check version-specific release notes for detailed changes
- Community: GitHub Discussions
- Issues: GitHub Issues