Skip to content

Instantly share code, notes, and snippets.

@momota10
Last active December 27, 2016 05:14
Show Gist options
  • Save momota10/b45da37c59aa536120d67f85a9a8932c to your computer and use it in GitHub Desktop.
Save momota10/b45da37c59aa536120d67f85a9a8932c to your computer and use it in GitHub Desktop.
Redshiftのクラスタを再構築せざるを得なかった話 ref: http://qiita.com/momotasasaki/items/6a5e23b1ccdae79c2ead
Dear Customer,
Our systems have identified a potential hardware issue that may affect your
Amazon Redshift cluster {your_cluster_name} the {your_region_name} AWS region.
As a precaution, we recommend that you restore a new cluster from a snapshot
within the next 2-3 days and delete your existing cluster.
This will automatically provision you on healthy hardware and help you
avoid an unplanned outage. Please confirm receipt of this message.
We apologize for the inconvenience, please let us know if you have any questions or concerns.
Regards,
Redshift Service Team
潜在的なハードウェアの問題を特定したので2~3日以内に新しいクラスタをスナップショットから復元して既存のクラスタを削除してね
# CNAMEの確認
$ dig redshift.production
# td-agent.confの変更
$ vim /etc/td-agent/td-agent.conf
# td-agent再起動
$ sudo service td-agent restart
# ログの確認
$ sudo tail -f /var/log/td-agent/td-agent.log
# 新クラスタの対象のテーブルにcount数があることを確認
production=# select count(*) from table_A;
count
-------
289(適当です)
(1 row)
UNLOAD ('select * from table_A')
TO 's3://{作ったバケット}/table_A/'
CREDENTIALS 'aws_access_key_id=hogehoge;aws_secret_access_key=hugahuga';
COPY action_logFROM 's3://{作ったバケット}/table_A/'
CREDENTIALS 'aws_access_key_id=hgoehgoe;aws_secret_access_key=hugahuga';
truncate table_A;
-- 確認用(0だったらok)
select count(*) from table_A;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment