← Back to Knowledge Base

KB #240046: Backup not encrypted even though “encrypt new” flag was set

⏱️ 2 min read

Type:

Tip

Summary:

This article explains why a SQL Backup is not being encrypted, even though the “encrypt new” flag is set, and the Backup is being created WITH INIT.

Additional Information:

The “Encrypt New Backups” flag (set in Admin Wizard – Additional Options screen; or programmatically the BLDCMD CLI) directs NetLib to encrypt new databases and backups when the file is being created. However, if an existing backup file already exists, SQL reuses that file even if you specify “WITH INIT”. So since a new backup file is not being created, it remains unencrypted. herefore, in order to encrypt the backup you can do one of two things:

  • If you have turned on the “encrypt new” flag and you will not be appending to an existing backup set:

    Delete the physical file. For example, the following query will delete the file associated with the device: mybackup1

    declare @filename as varchar(255), @command as varchar(255)
    set @filename = 
          (select phyname from master.dbo.sysdevices where name = 'mybackup1')
    if @filename is not null begin
       set @command = 'del "' + @filename + '"'
       EXEC master..xp_cmdshell @command , no_output
    end
    
  • If you will be appending to an existing backup set, or you are not using the “Encrypt New Backups” flag:

    Use Encrypt/Decrypt Wizard (or the SECTOOL CLI) to encrypt the existing backup file. Once the original backup file is encryped, all subsequent writes to the file will remain encrypted. Remember, it must be encrypted with the same key (or one of the same keys) specified in Admin Wizard  or with the BLDCMD API.

Related Topics:

240038SQL database backups to a Mapped Drive are not encrypted

Was this article helpful?

Related Articles

KB #240149: Encryptionizer Key Manager and Microsoft KB 5021123

Type: Information Summary: Impact of Microsoft KB5021123 – Description of the security update for SQL…

KB #240104: Event IDs and Error Codes

Type: Information Summary: Below are listed some of the Events that Encryptionizer writes to the…

KB #240145: Determine Current Encryptionizer Driver Information

Type: Info Summary: Most features, updates and improvements are based upon the version of Encryptionizer…

Still need help?

Our support team is here to assist you.

NetLib Security
AI Assistant · Online
Hi! I'm the NetLib Security assistant. I can answer questions about our encryption solutions, HIPAA compliance, Encryptionizer, and more. How can I help you today?