1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-01 13:43:23 +01:00
bitwarden-server/util/MsSql/backup-db.sql

11 lines
388 B
MySQL
Raw Normal View History

2017-08-21 16:58:00 +02:00
DECLARE @BackupFile varchar(100)
SET @BackupFile = '/etc/bitwarden/mssql/backups/vault_FULL_$(now).BAK'
2017-08-21 16:58:00 +02:00
DECLARE @BackupName varchar(100)
SET @BackupName = 'vault full backup for $(now)'
2017-08-21 16:58:00 +02:00
DECLARE @BackupCommand NVARCHAR(1000)
SET @BackupCommand = 'BACKUP DATABASE [vault] TO DISK = ''' + @BackupFile + ''' WITH INIT, NAME= ''' + @BackupName + ''', NOSKIP, NOFORMAT'
EXEC(@BackupCommand)