我正在尝试将数据库的cinder模式从Newton升级到Ocata版本。我发现有两个命令可以执行此操作,即cinder-manage db sync
和cinder-manage db online_data_migrations
,但是谁能为我解释这些命令的确切作用?谢谢!
这里的区别在于,db sync
命令升级数据库架构,而db online_data_migrations
迁移或重新格式化数据。
[在Octata下运行迁移命令时,将调用以下脚本。https://github.com/openstack/cinder/blob/ocata-em/cinder/db/sqlalchemy/api.py#L5854https://github.com/openstack/cinder/blob/ocata-em/cinder/db/sqlalchemy/api.py#L5537
一般的想法是,实现可能已更改,需要转换或移动数据才能在该服务的较新版本中工作。