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

8 lines
242 B
Bash
Raw Normal View History

#!/bin/sh
2017-08-30 05:05:52 +02:00
# 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
2017-08-21 16:58:00 +02:00
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P ${SA_PASSWORD} -i /backup-db.sql