backup-utility does not properly cleanup after itself
Summary
Running backup-utility
in the task-runner
pod does not properly cleanup it's temporary file storage when it's done.
Steps to reproduce
In the task-runner pod, do a backup and look at /srv/gitlab/tmp.
Configuration used
N/A
Current behavior
This is the content of srv/gitlab/tmp
in the task-runner
pod after a backup completes:
git@gitlab-prod-2-task-runner-5b6fc5f4b8-mbvxq:/srv/gitlab/tmp$ find .
.
./artifacts
./lfs
./uploads
./uploads/user
./uploads/user/avatar
./uploads/user/avatar/2
./uploads/user/avatar/2/avatar.png
./backup_tars
./backups
Notice the ./uploads/user/avatar/2/avatar.png
file hasn't been deleted.
If I subsequently go to my GitLab instance and delete that avatar from my profile, even though it gets deleted from object storage and the reference to it is removed from the database, my next backup will still include that avatar.png
file because it was left on the file system after the previous backup. If I later restore that backup, the avatar.png
file will get put back into object storage.
Expected behavior
I'd expect the backup file system to get cleaned up so that objects that get subsequently deleted to not keep getting included in ongoing backups/restores.
Versions
- Chart: 2.1.7
- Platform:
- Cloud: OCI
- Kubernetes: (
kubectl version
)- Client: 1.14.1
- Server: 1.14.1
- Helm: (
helm version
)- Client: 2.14.2
- Server: 2.14.3
Relevant logs
N/A