questdb - 如何在不丢失容器数据的情况下更新 QuestDB docker 版本?
问题描述
我有一个 QuestDB 容器,它目前正在运行旧版本,它的启动和停止是--name
为了保持数据:
docker run --name old_questdb \
-p 9000:9000 -p 9009:9009 questdb/questdb:5.0.5.4-linux-amd64
有什么方法可以挂载卷或从这个命名容器中获取持久数据到具有最新版本的新实例中?我想跑步6.0.4
解决方案
您可以将容器的内容复制到本地目录,然后将其挂载回新目录:
# copy the contents of the old_questdb container to the current dir
docker cp old_questdb:/root/.questdb $(pwd)
# run 6.0.4 and mount to the current dir
docker run --name new_questdb \
-v "$(pwd)/.questdb:/root/.questdb/" \
-p 9000:9000 -p 9009:9009 questdb/questdb:6.0.4
推荐阅读
- javascript - 在 javascript 中设置多案例倒数计时器时遇到问题
- powerbi - Power BI 如果为空,则输入值
- swift - 键盘出现时更改 ScrollView 插图
- angular - 翻译文件中的翻译和理解按钮
- php - 如何从网页PHP将本地pdf文件打印到另一个单元
- c# - 如何与 SSO 服务对话并打开 URL
- ios - 在 iOS 共享扩展中使用 React Native (0.60.4)
- clips - 如何在尝试 CLIPS 中所有可能的组合的多槽字段中求和整数
- c# - UWP CommandBar SecondaryCommand collides with AppBarButton Flyout
- reactjs - 为什么获取一个函数的状态有效而另一个无效?