Skip to content

Backups stored on Google Shared Drive not pruned. #777

@bitboss-ca

Description

@bitboss-ca

Describe the bug
Backups stored on Google Shared Drive not pruned.

To Reproduce
Steps to reproduce the behavior:

  backup:
    container_name: container-backup
    image: offen/docker-volume-backup:latest
    restart: always
    env_file: ./backup.env
    volumes:
      - db_data:/backup/my-app-backup:ro
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./gdrive-credentials.json:/creds/google-credentials.json
    networks:
      - backend
    security_opt:
      - no-new-privileges:true
BACKUP_CRON_EXPRESSION="25 04 * * *"
BACKUP_FILENAME="backup-vol-container-db-%Y%m%d-%H%M%S.{{ .Extension }}"
GOOGLE_DRIVE_CREDENTIALS_JSON_FILE=/creds/google-credentials.json
GOOGLE_DRIVE_FOLDER_ID="[...SNIP...]"
GOOGLE_DRIVE_IMPERSONATE_SUBJECT="[...SNIP...]"
BACKUP_RETENTION_DAYS="14"
BACKUP_PRUNING_PREFIX="backup-vol-container-db-"
BACKUP_STOP_DURING_BACKUP_LABEL="container"
NOTIFICATION_URLS="s[...SNIP...]"

Expected behavior
Backups pruned after 14 days

Actual Behaviour
Note: there are definitely more than 0 backups in Google Drive and many are older than 14 days.

time=2026-05-02T17:40:31.177-07:00 level=WARN msg="Deprecated timezone bind mounts detected: /etc/timezone, /etc/localtime. Support for these will be removed in a future version."
time=2026-05-02T17:40:31.177-07:00 level=WARN msg="Set the container timezone using the `TZ` environment variable instead."
time=2026-05-02T17:40:31.177-07:00 level=WARN msg="Refer to the documentation for migration details."
time=2026-05-02T17:40:31.211-07:00 level=INFO msg="Stopping 1 out of 65 running container(s) as they were labeled docker-volume-backup.stop-during-backup=container or docker-volume-backup.stop-during-backup-no-restart=true."
time=2026-05-02T17:40:32.313-07:00 level=INFO msg="Created backup of `/backup` at `/tmp/backup-vol-container-db-20260502-174031.tar.gz`."
time=2026-05-02T17:40:32.508-07:00 level=INFO msg="Restarted 1 out of 1 stopped container(s)."
time=2026-05-02T17:40:32.514-07:00 level=INFO msg="Starting upload for backup 'backup-vol-container-db-20260502-174031.tar.gz'." storage=GoogleDrive
time=2026-05-02T17:40:35.179-07:00 level=INFO msg="Finished upload for backup-vol-container-db-20260502-174031.tar.gz. File ID: [...SNIP...]]" storage=GoogleDrive
time=2026-05-02T17:40:35.267-07:00 level=INFO msg="None of 0 existing backups were pruned." storage=GoogleDrive
time=2026-05-02T17:40:35.276-07:00 level=INFO msg="Removed tar file `/tmp/backup-vol-container-db-20260502-174031.tar.gz`."

Version (please complete the following information):

  • Image Version: latest - i.e. 2.48.0
  • Docker Version: 29.1.3
  • Docker Compose Version (if applicable): 2.40.3

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions