简体   繁体   中英

How can I shut down a RedShift cluster from the command line?

I want to shut down an AWS RedShift cluster through the command line, to avoid cluster charges in night time when no one use it.

I tried to search for the command, but didn't find it.

Anyone has idea about it?

Sounds like you're looking for delete-cluster ?

Example usage that takes a final snapshot:

aws redshift delete-cluster --cluster-identifier mycluster --final-cluster-snapshot-identifier myfinalsnapshot

You can use this snapshot with restore-from-cluster-snapshot to restore when you need to set the cluster up again:

aws redshift restore-from-cluster-snapshot --cluster-identifier mycluster-clone --snapshot-identifier my-snapshot-id

This is the most approximate way to perform a "shut down" operation as you've described -- you cannot start and stop RedShift like an EC2 instance, so you must destroy and recreate it instead. This will at least allow you to stop and start operations on your data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM