Back up/Clean up resources

If you want to terminate the cluster, firstly make sure you copy all files to S3 or locally as all the file systems will be deleted once you delete the cluster (unless you created FSx file system outside of AWS ParallelCluster).

The FSx for Lustre volume has been set to backup every day but if you delete the cluster, the file system and these backups will be deleted too (unless you followed the steps to attach a FSx volume that was created outside of ParallelCluster). So if you want to restore from a previous FSx Lustre on a new cluster you can do a manual backup from the FSx for Lustre console (as well as the CLI).

Firstly head to the FSx for Lustre console, where you should see your FSx for Lustre volume. You can then click Actions and backup.

clean-1

Then provide a name for your backup.

clean-1

You can then see the list of all the backup’s you’ve had (which may be several if you do this over several days) as well as the manual one in progress.

clean-1

Once these have been completed (i.e it says backup available), head back to AWS CloudShell and type:

$ pcluster delete clustername

To delete the keypair

$ aws ec2 delete-key-pair --key-name cfd_ireland

Make sure you check the EC2 console that your instances have been deleted and if you want to also remove your S3 bucket, head to the S3 console and delete objects and then the bucket itself.

If you wish to create another cluster from this backup, you can just use a modified fsx lustre part of your config file:

i.e change from:

[fsx fsxshared]
shared_dir = /fsx
storage_capacity = 1200
deployment_type = PERSISTENT_1
storage_type = SSD
per_unit_storage_throughput = 100
daily_automatic_backup_start_time = 00:00
automatic_backup_retention_days = 30

to:

[fsx fsxshared]
shared_dir = /fsx
fsx_backup_id = backup-xxxxx