Upgrade¶
This page describes the version upgrade process for OpsAnt.
Preparation Before Upgrade¶
- Back up the database:
- Back up the configuration directory:
Upgrade Steps¶
1. Pull the new image¶
2. Update configuration (if there are changes)¶
Compare the new version's install/conf/ with the local configuration, and synchronize any newly added items.
3. Restart the container¶
docker stop opsany-proxy-opsant
docker rm opsany-proxy-opsant
# 用新镜像重新启动(参数与部署时一致)
docker run -d --name opsany-proxy-opsant ... registry.cn-beijing.aliyuncs.com/opsany/opsany-proxy-opsant:<新版本>
4. Run database migration¶
5. Verify¶
Access the platform and confirm that the version number (in the lower-left corner of the menu) has been updated and that functionality works properly.
Rollback¶
If the upgrade fails, roll back using the backed-up data and configuration:
# 恢复数据库
docker exec -i opsany-proxy-mysql mysql -uroot -p<密码> < opsant-backup.sql
# 恢复配置
tar xzf opsant-conf-backup.tar.gz -C /
# 用旧镜像重启容器
Version Notes¶
- Before upgrading, please check the changelog to learn about version changes
- Before upgrading across major versions, it is recommended to verify in a test environment first