Gitlab Omnibus: delete backup from Amazon S3

I would like to delete backup files older than 1 week. I followed this backup document from gitlab and successfully created backup files for upload to Amazon S3.

I also configured gitlab_rails['backup_keep_time'] = 604800, but it does not work.

However, from what I observe in the IAM user policy that they created. No permission to delete files.

Backup files are packaged, and I would not want to do this manually in AWS.

Is there any standard way to delete backup files in gitlab omnibus for Amazon S3?

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt1412062044000",
      "Effect": "Allow",
      "Action": [
        "s3:AbortMultipartUpload",
        "s3:GetBucketAcl",
        "s3:GetBucketLocation",
        "s3:GetObject",
        "s3:GetObjectAcl",
        "s3:ListBucketMultipartUploads",
        "s3:PutObject",
        "s3:PutObjectAcl"
      ],
      "Resource": [
        "arn:aws:s3:::my.s3.bucket/*"
      ]
    },
    {
      "Sid": "Stmt1412062097000",
      "Effect": "Allow",
      "Action": [
        "s3:GetBucketLocation",
        "s3:ListAllMyBuckets"
      ],
      "Resource": [
        "*"
      ]
    },
    {
      "Sid": "Stmt1412062128000",
      "Effect": "Allow",
      "Action": [
        "s3:ListBucket"
      ],
      "Resource": [
        "arn:aws:s3:::my.s3.bucket"
      ]
    }
  ]
}
+8
source share
3

S3, :

  • S3 Lifecycle .

    Step 1

  • " ".

    Step 2

  • ( , ) .

    Step 3

  • " ".

    Step 4

  • , .

    Step 5

+14

s3, AWS. s3 bucket , .

+1

, backup_keep_time . GitLab , (, AWS S3)...

https://docs.gitlab.com/ce/raketasks/backup_restore.html

0

All Articles