1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00
bitwarden-server/util/MsSql/backup-db.sh
2017-08-29 23:05:52 -04:00

8 lines
242 B
Bash

#!/bin/sh
# Delete backup files older than 30 days
find /etc/bitwarden/mssql/backups/ -type f -name '*.BAK' -mindepth 1 -mtime +30 -delete
# Do a new backup
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P ${SA_PASSWORD} -i /backup-db.sql