加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

bash – 有没有办法关闭并启动带有cli的AWS红移群集?

发布时间:2020-12-15 21:22:41 所属栏目:安全 来源:网络整理
导读:我只是提出一个红移集群来开始开发工作,并且通常使用cron服务在工作时间之外关闭我的所有开发资源以节省资金. 当我浏览aws cli帮助时: aws redshift help 我没有看到任何停止或关闭我的测试集群的选项,就像我在控制台中一样. 如果没有办法做到这一点,有人知
我只是提出一个红移集群来开始开发工作,并且通常使用cron服务在工作时间之外关闭我的所有开发资源以节省资金.

当我浏览aws cli帮助时:

aws redshift help

我没有看到任何停止或关闭我的测试集群的选项,就像我在控制台中一样.

如果没有办法做到这一点,有人知道他们为什么不提供此功能吗?这些实例非常花钱,可以保持在线,我不想每天晚上都用手将它们关闭.

解决方法

听起来你正在寻找:

> delete-cluster,明确指定最终快照
> restore-from-cluster-snapshot,恢复上面拍摄的快照

来自aws-cli aws redshift delete-cluster documentation:

If you want to shut down the cluster and retain it for future use,set
SkipFinalClusterSnapshot to “false” and specify a name for
FinalClusterSnapshotIdentifier . You can later restore this snapshot to resume using the cluster. If a final cluster snapshot is requested,
the status of the cluster will be “final-snapshot” while the snapshot
is being taken,then it’s “deleting” once Amazon Redshift begins
deleting the cluster.

示例用法,再次来自文档:

# When shutting down at night...
aws redshift delete-cluster --cluster-identifier mycluster --final-cluster-snapshot-identifier my-snapshot-id

# When starting up in the morning...
aws redshift restore-from-cluster-snapshot --cluster-identifier mycluster --snapshot-identifier my-snapshot-id

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读