LoginSignup
0
0

More than 1 year has passed since last update.

AWS Backupの実行履歴をAthenaで見る

Last updated at Posted at 2023-04-20

前振り

モチベーション

  • AWS Backupはマネコンから30日までのデータしか見れないので、それ以上の期間で確認したい場合
  • 日付で範囲選択ができないので、それがしたい場合

スクリーンショット 0005-04-20 11.31.35.png

前提情報

既にAWS BackupでログをS3に出力している状態

作業の流れ

  • Glue Crawlerの作成と実行
  • Athenaでクエリ

Glue Crawlerの作成と実行

作成

Crawler名を入れて[次へ]をクリック

スクリーンショット 0005-02-26 13.04.16.png

「Not yes」にチェック入れて[次へ]をクリック

スクリーンショット 0005-02-26 13.04.23.png

AWS Backupのログを出力しているS3 Pathを指定して[次へ]をクリック

スクリーンショット 0005-02-26 13.05.58.png

必要な権限を付与したIAMロールを指定して[次へ]をクリック

スクリーンショット 0005-02-26 13.06.30.png

レポート作成頻度が日次なら、クローラーも日次がよいでしょう。次の画面にいったら[Create Crawler]をクリック

スクリーンショット 0005-02-26 13.07.52.png

実行

Athenaでクエリしてバックアップ履歴を確認

2023年4月の第2週(4/3〜4/9)のログのみ表示。他にもSQLでいろいろクエリ出来ますね。

SQL
SELECT * FROM "se2"."demo_bk_ap_northeast_1" where partition_0 = '2023' and partition_1 = '04' and partition_2 between '03' and '09' order by "report time period end" asc;

スクリーンショット 0005-04-20 11.44.56.png

まとめ

メリットは以下が出来るようになるです。

  • AWS Backupはマネコンから30日までのデータしか見れないので、それ以上の期間で確認したい場合
  • 日付で範囲選択ができないので、それがしたい場合

参考

AWS Backup Audit Managerのレポート機能(公式)

AWS Backupの薄い教科書

0
0
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
0
0