Upgrading a Large Model Application Platform on macOS: A Major Version Migration Guide
This guide walks through upgrading a large model application platform to a new major version on macOS. It explains why major version upgrades fail more often than patch upgrades, how to prepare a full backup and rollback plan, the correct sequence for replacing images and restarting containers, and how to fix the two most common failures: missing workflows after login and missing model provider or tool entries. It also includes a post-upgrade verification checklist and general principles for making the upgrade a repeatable, low-risk process.
1. Why Major Version Upgrades Often Go Wrong
Running a large model application platform through container orchestration on a local development machine is a common approach for prototyping and internal pilots. However, moving from an older major version to a newer one fails far more often than a patch upgrade, and the reason is straightforward: major versions often ship breaking changes to the underlying data model, extension mechanism, and directory layout. Patch releases usually fix defects, while a major release redefines where things live and in what form they are stored.
Take the upgrade scenario in this article as an example. The old version kept all workspace data, vector indexes, and uploaded files together in a data volume folder under the orchestration directory. The new version introduces an extension (plugin) system, so model providers and tools are no longer built into the code but must be installed as separate extension packages. This means two things: the old data must be correctly moved to its new location, and capabilities that used to work out of the box must be reassembled. If either step is missing, the result is an instance where you “can log in but everything is empty” or where “feature entry points have disappeared.”
The key takeaway is that an upgrade is not as simple as swapping an image tag. It is a change operation that includes data migration, and it must follow the order of backup, replace, verify, repair, and verify again.
2. Before the Upgrade: Keep Rollback Capability in Hand
2.1 Scope of the Data Backup
On macOS, persistent data for a local deployment almost always lives in the data volume folder inside the orchestration directory. This typically includes database data, vector store indexes, uploaded files in object storage, and several configuration files. Copy the entire folder before making any changes rather than backing up only the database. The reason is direct: restoring from a database-only backup leaves you in a half-broken state where “the records exist but the files do not,” which costs far more time to troubleshoot than a full backup.
An illustrative set of commands is shown below (replace them with your actual directories):
# Assume the orchestration directory is ~/apps/app-platformcd ~/apps/app-platformtar -czf backup-pre-upgrade-$(date +%Y%m%d).tar.gz volumes docker-compose.yaml .env
It is also advisable to record the current image version, the contents of the environment variable file, and any customized orchestration configuration. These determine whether you can restore the environment exactly as it was during a rollback.
2.2 Environment and Network Prerequisites
Installing extensions in the new version usually requires access to an external extension marketplace repository, so the local network needs stable public internet access. If you work in a restricted network environment, confirm in advance that proxy settings are effective inside the container; otherwise the installation step will hang for a long time or repeatedly time out. In addition, on macOS it is recommended to raise the resource allocation (CPU, memory, disk) of the container runtime appropriately. Extension installation is a concurrency-heavy operation, and insufficient resources will significantly increase the time it takes.
2.3 Choose an Off-Peak Window and Reserve Enough Time
The first startup after upgrading to a new major version performs data structure adjustments, and the time required scales with the data volume. For instances with large amounts of data, reserve a sufficient maintenance window and avoid forcibly interrupting the process midway, which can leave the data half-migrated.
3. Performing the Upgrade: Image Replacement and Startup Order
Once the backup is confirmed, pull the new version image and recreate the containers. The core principle is to stop the old version first, then swap in the new one, and start it last. Do not mix old and new images at the same time, or the data volume may be written by both versions simultaneously.
# Stop the old instance (keep the data volume)docker compose down# Pull the new version imagedocker compose pull# Start the new instancedocker compose up -d
After startup, check the logs first to confirm that steps such as database migration and cache initialization have completed normally, then move on to verifying the interface.
4. Troubleshooting: Two High-Frequency Failures
4.1 You Can Log In but All Workflows Are Gone
This is the most typical symptom: the account system works and the interface is accessible, but historical workflows, knowledge bases, and application configurations are all missing. The root cause is that the data directory read by the new version does not match the one used by the old version, so the interface shows an “empty instance.”
The fix is to copy the entire backed-up old data volume folder into the new orchestration directory, overwrite the directory with the same name, and then restart the container runtime so it remounts:
# Move the entire old data volume into the new directory (illustrative)cp -R ~/backup/app-platform/volumes ~/apps/app-platform-new/# Restart the container runtimedocker compose restart
Two points need attention. First, confirm that the new instance has stopped writing before copying, to avoid files being modified concurrently. Second, the overwrite must not be done by selectively picking items, because there are reference relationships inside the data volume, and a single missing subdirectory can cause some features to malfunction. After the restart, log in again and the workflows and knowledge bases should be restored.
4.2 Model Provider and Tool Entry Points Are Missing
The new version changes model integration and tool invocation into an extension form, and provider configurations built into the old version do not automatically become installed extensions, so the interface shows that “no models are available.” The migration approach is to first export the list of extensions actually used by the current instance, then install them in bulk on the new instance according to that list.
Step one, locate the container running the backend service:
docker ps# Find the container ID for the backend service in the output, for example a3cb19c2****
Step two, open a terminal inside that container:
docker exec -it a3cb19c2**** bash
Step three, export the extension list from inside the container. This command scans all models and tools actually referenced across the workspaces of the current instance and writes the result to a file with one JSON object per line. The number of lines equals the number of extensions, and --workers controls the number of concurrent processes and can be adjusted to the machine’s performance:
poetry run flask extract-plugins --workers=20# Output: plugins.jsonl
Step four, after confirming the container can reach the external extension repository, install according to the list. A conservative concurrency setting is recommended during installation to avoid maxing out local resources and causing timeouts:
poetry run flask install-plugins --workers=2
After installation, restart the backend container and return to the interface to confirm that model providers and tools can be selected normally. If an individual extension fails to install, it is usually due to network fluctuations or because the extension has been renamed or merged in the new version. In that case, retry it separately, or manually search for the corresponding capability in the interface and add it again.
5. Post-Upgrade Verification Checklist
Confirm each item below in order, and do not put the instance into use until every one passes:
- The account can log in normally, with no anomalies in permissions or member configuration;
- Historical workflows can be opened and run, with no node configuration lost;
- Knowledge base documents exist and searches return results, indicating the vector index is usable;
- The model provider list is complete and a conversation call can be initiated successfully;
- Tool extensions can be authorized and executed;
- Uploaded files can be previewed, indicating the object storage directory is mounted correctly;
- There are no continuous errors in the logs and container status is stable.
6. Turning the Upgrade into a Repeatable Process
Experience from local environment upgrades should ultimately be captured as reusable scripts and checklists. This is also the general practice for making similar changes in cloud environments later. In the cloud, persistent data is usually handed to block storage or file storage services, orchestration is handled by a container platform, and snapshots, log services, and monitoring alerts are used to keep the change safe. When performing a similar upgrade in a cloud environment such as Baidu AI Cloud, you can use snapshot capabilities to protect data first, then use monitoring and alerts to observe changes in resource usage and error rates during migration, so that you can roll back as soon as an anomaly appears.
Three general principles are worth remembering: backups must be full, changes must be rollback-capable, and there must be a clear functional verification checklist after migration. With these three in place, a major version upgrade is no longer a high-risk operation but a controlled routine maintenance task.
