5 additional features for DB Backup

Feature name:

  1. Snapshot-able database backups
  2. Easily reference the latest backup with symlinks.
  3. Customisable $BACKUP_DB_FILENAME
  4. Allow users to specify a suffix to the backup filename
  5. Use variable $BACKUP_DB_DIR for repetitive reference to the same path (minor necessity to implement above)
  6. Customize amount of backups to keep with $BACKUP_DB_KEEP_MTIME variable

Feature Description

  1. Allow users to automatically make a copy of the latest backup to a specific filename.
    Overwriting the same file should help when making backups of the infrastructure with snapshot/deduplication algorithms. e.g.: restic
    Note: This does not delete/overwrite the usual backups with the timestamps
    Default filename: vault_FULL_LATESTCOPY.BAK
  2. Allow users to automatically symlink ln -s with a specified name to the latest backup file. This helps in other automation/easy reference scenarios.
    Default filename: vault_FULL_LATESTLN.BAK
  3. Similar to 4 (below), but, covers the part before the suffix.
  4. This helps when users make manual backups, e.g.:
    docker exec -ti -u '1000:1000' -e BACKUP_DB_FILENAME_SUFFIX='_Test' -e bitwarden-mssql /backup-db.sh
  5. Not an actual feature for the users, just more centralised code.
  6. Users are able to define the amount of backups to keep based on the modified time (mtime parameter in find).
    Default: +32 (delete any backups more than 32 days old)

Clients / Repos Affected:

  • Server

Timeline to completion (estimate):

ETA: Completed

1 Like

@tgreer - Made some edits with some additional info. This should be the final version, unless changes requested.

Kind regards,

1 Like