How can I add encryption to ola.hallengren backup script.
In short i want to achieve this
BACKUP DATABASE [MyTestDB]
TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Backup\MyTestDB.bak'
WITH
COMPRESSION,
ENCRYPTION
(
ALGORITHM = AES_256,
SERVER CERTIFICATE = MyTestDBBackupEncryptCert
),
STATS = 10
Go
Best Answer
In the documentation for Ola Hallengren's backup scripts, he explains these parameters:
At the bottom of the page, in the examples, there's an example to back up all user databases with compression, encryption, and a server certificate:
So based on my extensive research and a good thirty seconds of reading, it would be: