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
    Env variables: BACKUP_DB_COPYOFLATEST=true & BACKUP_DB_COPYOFLATEST_FILENAME=<FileName>
    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.
    Env variables: BACKUP_DB_LNFORLATEST=true & BACKUP_DB_LNFORLATEST_FILENAME=<FileName>
    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

This is a welcomed improvement. You should be able to get a full zip file containing the database with your vault and everything in it in the standalone app.

Thanks.

When you say:

What are you referring to sorry?

The standard app, without any extra modifications or third party tools.

This PR doesn’t use any additional 3rd party apps, it only makes additional options available to admins, who could use a backup solution of their choice.