mirror of
https://github.com/bitwarden/server.git
synced 2024-12-27 17:47:37 +01:00
8471f558e3
* Improve mssql backups * Launch DB backup at 23:59
11 lines
388 B
Transact-SQL
11 lines
388 B
Transact-SQL
DECLARE @BackupFile varchar(100)
|
|
SET @BackupFile = '/etc/bitwarden/mssql/backups/vault_FULL_$(now).BAK'
|
|
|
|
DECLARE @BackupName varchar(100)
|
|
SET @BackupName = 'vault full backup for $(now)'
|
|
|
|
DECLARE @BackupCommand NVARCHAR(1000)
|
|
SET @BackupCommand = 'BACKUP DATABASE [vault] TO DISK = ''' + @BackupFile + ''' WITH INIT, NAME= ''' + @BackupName + ''', NOSKIP, NOFORMAT'
|
|
|
|
EXEC(@BackupCommand)
|