Upgrade and Version Migration
This page covers the AsterDrive version upgrade flow: what to back up before upgrading, how to upgrade binary and Docker deployments, how to verify after upgrade, and how to roll back if something goes wrong. Find the section matching your deployment method.
Do These Before Upgrading
Section titled “Do These Before Upgrading”No matter which deployment method you use, do these first:
- Read the corresponding version section in the changelog, especially
Changed/Removed/Deprecated. - Take a full backup once. At minimum, include
data/config.toml, the database, and all local storage directories. Preserve both the login signing key and MFA encryption key inconfig.toml. See Backup and Restore. - Confirm the database account has DDL permissions. Startup automatically runs migrations. If the account lacks
CREATE/ALTER, startup fails. - Estimate the downtime window. Small deployments take tens of seconds. If the database already has a lot of data, read the MySQL section below.
If you manage production, run the full upgrade flow in a test environment before upgrading production.
Docker Upgrade
Section titled “Docker Upgrade”The most common and simplest scenario.
# Pull the latest imagedocker pull ghcr.io/astercommunity/asterdrive:latest
# Restart the containerdocker compose downdocker compose up -d
# Watch startup logs and confirm migration finishesdocker compose logs -f asterdriveStartup logs show migration phase output. Seeing a message such as application started is enough.
If you use docker run instead of compose, keep mounted volumes unchanged (asterdrive-data volume + config.toml mount point).
After upgrading, validate according to Check These Items Immediately After Startup.
systemd / Binary Upgrade
Section titled “systemd / Binary Upgrade”# 1. Stop servicesudo systemctl stop asterdrive
# 2. Back up current binary in case rollback is neededsudo cp /usr/local/bin/aster_drive /usr/local/bin/aster_drive.bak
# 3. Replace binarysudo install -m 755 ./aster_drive /usr/local/bin/aster_drive
# 4. Startsudo systemctl start asterdrive
# 5. Watch logssudo journalctl -u asterdrive -fMigrations run automatically at startup. Seeing the service listen on the port normally is enough.
If you want to run migration separately before startup, for example to separate migration errors from service startup errors, use:
sudo -u asterdrive ./aster_drive database-migrateSee Operations CLI.
MySQL Large Table ALTER Notes
Section titled “MySQL Large Table ALTER Notes”For large MySQL deployments:
- Reserve a maintenance window. Stop the service, run migration, confirm completion, then start the service.
- Or use online schema change tools such as
gh-ostorpt-online-schema-changeto run ALTER first, then start the new version service.
PostgreSQL and SQLite are not affected by this limitation.
If future versions include similar migrations, they will be clearly marked in the changelog.
Post-Upgrade Validation
Section titled “Post-Upgrade Validation”After upgrading, run through this checklist:
/healthreturns 200./health/readyreturns 200, meaning DB and default storage backend both work.- The admin panel opens normally.
- Use a real account to log in, upload a file, download, share, and restore one trash item.
- Run
aster_drive doctoronce.
If WebDAV / WOPI is enabled, also validate:
- WebDAV client can mount, read, and write.
- WOPI client can open Office files.
These validations are not ceremony; they are your own confidence check that the upgrade did not break any edge feature.
What If Upgrade Fails
Section titled “What If Upgrade Fails”Separate by failure phase:
Migration Phase Fails
Section titled “Migration Phase Fails”Read the specific error in logs. Common causes:
- Database account lacks DDL permissions -> grant permissions and start again.
- A previous upgrade was interrupted and the migration table state is inconsistent -> back up the current state before contacting developers. This is important.
If you urgently need to restore service, you can roll back to the old version only if no DDL from the migration actually succeeded. If migration partially executed, the old version may fail to start because the schema no longer matches. You must restore from backup.
Some Features “Disappeared” After Startup
Section titled “Some Features “Disappeared” After Startup”They usually did not disappear; their location or name changed. First read the corresponding version section in the changelog. If the changelog does not mention it, open an issue.
Behavior Is Abnormal After Startup but There Is No Error
Section titled “Behavior Is Abnormal After Startup but There Is No Error”Handle it according to Troubleshooting.
Rollback
Section titled “Rollback”Rollback steps:
- Stop the service.
- Restore
config.toml, database, and local storage directories from backup to the point before upgrade. - Replace the binary with the old version.
- Start.
- Run
aster_drive doctorto confirm state.
See Backup and Restore.
Upgrading from Old Versions
Section titled “Upgrading from Old Versions”The formal upgrade path for the current version is based on migration history from v0.1.0 and later. That means the database seaql_migrations table should contain the current baseline migration record:
m20260512_000001_baseline_schemaIf you upgrade from v0.1.0 or later, follow the Docker / systemd steps above. The service automatically applies subsequent migrations during startup.
Early alpha / beta / rc prerelease builds used migration history that has since been rearranged. The current version no longer includes those rebase compatibility branches, and it will not automatically rewrite old migration records into the current baseline. Instances still on early prerelease history need to first upgrade to an intermediate version that can complete the rebase at that time and confirm migration completion, then continue upgrading; or restore from a backup that already completed the current baseline.
Do not manually modify seaql_migrations, and do not empty business tables to bypass migration errors. If migration metadata and real business table structure do not match, directly starting the new version may create harder-to-recover data problems.