BACKUP MASTER KEY
copies master key key material out
What changes
- Input
- master key key material
- Output or change
- backup device, file or URL
Syntax at a glance
BACKUP MASTER KEY TO { FILE = 'path_to_file' | URL = 'Azure Blob storage URL' } ENCRYPTION BY PASSWORD = 'password'
Work example
A database master key needs a recovery copy stored outside the database backup.
Use the approved secret process and record the file owner, access path, and restore test.
Check your work A lab restore opens the master key without exposing its password in code or logs.
Open Microsoft Learn for full syntax, permissions, and details for your version.