400 (AccessControlListNotSupported) The bucket does not allow ACLs on backup restore from object storage
When having a backup file with S3 buckets object storage (where object storage is backed up as well) and restoring it to a gitlab helm installation receiving the following error:
Restoring uploads ...
[Error] ERROR: File 's3://gitlab-gitlab-uploads/user/avatar/1/avatar.png' could not be copied: 400 (AccessControlListNotSupported): The bucket does not allow ACLs
Summary: 1 source files to copy, 0 files at destination to delete
Done. Copied 0 files in 1.0 seconds, 1.00 files/s.
sync existing of uploads failed
command terminated with exit code 1
The restore is done from backup file stored on object storage also with the:
kubectl exec <OUR TOOLBOX POD NAME> -it -- backup-utility --restore -t <OUR BACKUP TIMESTAMP NAME>
When Object storage is backed up with the SKIP , the restore works kubectl exec <OUR TOOLBOX POD NAME> -it -- backup-utility --skip packages,builds,external_diffs,lfs,uploads
Chart version: gitlab-7.7.0
App version: v16.7.0
Chart config:
USER-SUPPLIED VALUES:
USER-SUPPLIED VALUES: null
certmanager-issuer:
email: example@gitlab.com
gitlab:
toolbox:
backups:
objectStorage:
backend: s3
config:
key: connection
secret: gitlab-bacup-secret3 <= btw this is correct made some typos while creating secret
global:
appConfig:
artifacts:
bucket: gitlab-gitlab-artifacts
connection:
key: connection
secret: gitlab-rails-storage
enabled: true
backups:
bucket: gitlab-gitlab-backups
tmpBucket: gitlab-gitlab-backups
lfs:
bucket: gitlab-gitlab-lfs
connection:
key: connection
secret: gitlab-rails-storage
enabled: true
packages:
bucket: gitlab-gitlab-packages
connection:
key: connection
secret: gitlab-rails-storage
enabled: true
uploads:
bucket: gitlab-gitlab-uploads
connection:
key: connection
secret: gitlab-rails-storage
enabled: true
gitaly:
packObjectsCache:
enabled: true
hosts:
domain: HOSTNAME.COM
externalIP: external_ip
minio:
enabled: false
S3 Bucket Policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::025692356872:user/gitlab"
},
"Action": [
"s3:*"
],
"Resource": [
"arn:aws:s3:::gitlab-gitlab-uploads/*",
"arn:aws:s3:::gitlab-gitlab-uploads"
]
}
]
}
Object storage overall works fine, backups and uploads are stored where it is supposed to be.
User has AmazonS3FullAccess policy attached.
Edited by Julius Kvedaras