1
0

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 1 year has passed since last update.

EFS をバックアップからリストアする手順

Last updated at Posted at 2023-06-02

EFS のバックアップからのリストア方法です。

EFS のリストア

まず、AWS Backup のバックアップボールとから対象の EFS をリストアします。

AWS Backup のバックアップボールトから、対象の EFS の希望の復旧ポイントを選択します。
スクリーンショット 2023-05-29 17.43.48.png

内容を確認して復元をクリックします。
スクリーンショット 2023-05-29 17.44.18.png

新しく EFS を立ち上げてそちらにリストアするので「新しいファイルシステムに復元する」を選択します。
スクリーンショット 2023-05-29 17.49.50.png

EFS の入れ替え

復旧ポイントから新しい EFS が立ち上がったらマウントターゲットを作り直します。

インスタンス

インスタンスに SSH or セッションマネージャーを繋ぎファイルシステムの更新を行います。

/etc/fstab の内容を書き換えます。

$ sudo vi /etc/fstab

/etc/fstab の内容は以下のようになっているので EFS ID を新しい EFS の ID に書き換えます。
{efs id} は実際には「fs-n1kmx71uudmu1pmjk」などの値が入っています。

{efs id}:/ /mnt/efs efs defaults,_netdev 0 0

バックアップディレクトリからの移動

リストアされた新 EFSは、バックアップ元とディレクトリの階層がずれています。
そのままでは動作しないため、修正します。

# リストアされたフォルダを確認します
$ sudo mount /mnt/efs
$ ls -la /mnt/efs/aws-backup-restore_{restore date}/
# ディレクトリを修正していきます
$ cd /mnt/efs
$ sudo mv aws-backup-restore_{restore date}/* ./
# 必要ないフォルダを削除します
$ sudo rm -rf aws-backup-restore_{restore date}/

※ {efs id} は実際には「fs-n1kmx71uudmu1pmjk」などの値となります
※ {restore date} は実際には「2023-05-29T06-36-11-707016Z」などの値となります。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?