3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

TIMESTAMPの指定でS3の過去の状態を復元できるs3-pit-restore

3
Posted at

Advent Calendarの季節ですが、あまりにも小ネタなので単発記事で書きます。

S3に保存されている「もう必要ないだろう」と思っていたデータが急遽必要となり、過去のS3のデータを復元する必要が出てきました。念の為バージョン管理していたものの、一つ一つのファイルを指定していくのは大変だし、Pythonスクリプトでやるには不安だしどうしよう…。

そんなとき、こちらで紹介されていたs3-pit-restoreのおかげで助かった、という記事です。

このようにタイムスタンプの指定でローカルのディレクトリに復元したり、

$ s3-pit-restore -b my-bucket -d restored-bucket-local -t "06-17-2016 23:59:50 +2"

別のバケット(restored-bucket-s3)に移したりできます。今回必要だったデータの容量が大きいため、私はこちらでやりました。

 $ s3-pit-restore -b my-bucket -B restored-bucket-s3 -t "06-17-2016 23:59:50 +2"

もちろん、バージョン管理されたS3バケットでしか使えないし、多少の時間はかかりますが、とりあえずこれで事無きを得ました。

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?