Skip to content

Commit

Permalink
Enable automatic backups for homedirs on AWS
Browse files Browse the repository at this point in the history
"Automatic backups" are documented by AWS in
https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#automatic-backups,
and are done *daily* with a 35 day retention period. We could
customize this in the future, but this is a great start.

Fixes 2i2c-org#623
  • Loading branch information
yuvipanda committed Sep 28, 2023
1 parent d7c2f7a commit 8108e7a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions terraform/aws/efs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,13 @@ resource "aws_efs_mount_target" "homedirs" {
output "nfs_server_dns" {
value = aws_efs_file_system.homedirs.dns_name
}

# Enable automatic backups for user homedirectories
# Documented in https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#automatic-backups
resource "aws_efs_backup_policy" "homedirs" {
file_system_id = aws_efs_file_system.homedirs.id

backup_policy {
status = "ENABLED"
}
}

0 comments on commit 8108e7a

Please sign in to comment.