Вопрос

I want to backup my encrypted database (database level not column level) with this command:

gbak myDb.IB myDb.bak -b -user sysdba -pass masterkey -encrypt mySep -sep myseppass -service service_mgr

But it doesn't work. Here is the error message: gbak: ERROR: encryption mySep is not password-protected What is the problem?

I have created an encrypted database with Interbase with these commands:

alter database set system encryption password 'myseppass' external;
CREATE ENCRYPTION mySep FOR DES WITH LENGTH 56 BITS FOR DES WITH LENGTH 56 BITS password system encryption password INIT_VECTOR RANDOM;
GRANT encrypt on encryption mySep to SYSDBA;

With IBConsole, i can connect to the database, and in the properties, i see that it is encrypted.

Thank you for reading.

Это было полезно?

Решение

Finally, i was successful with the interbase encryption with interbase XE. Here are the main parts of the script to encrypt a DB, make an encypted backup and restore it also encrypted. The database must be created with the embedded user authentication (EUA) enabled.

// connected with SYSDSO: prepare keys and grants
ALTER DATABASE SET SYSTEM ENCRYPTION sepPass;

CREATE ENCRYPTION dbKey FOR DES with LENGTH 56 BITS INIT_VECTOR RANDOM;
CREATE ENCRYPTION backupKey FOR DES with LENGTH 56 BITS password backupKeyPass;

GRANT ENCRYPT ON ENCRYPTION dbKey to SYSDBA;
GRANT ENCRYPT ON ENCRYPTION backupKey to SYSDBA;

// connected with SYSDBA: encrypt database
ALTER DATABASE ENCRYPT WITH dbKey;

// To backup and restore db with gbak
Backup:
gbak -b -v EMPLOYEE.IB EMPLOYEE.IBAK -user SYSDBA -pas masterkey -sep sepPass -encrypt backupKey -se service_mgr

Restore:
gbak -r -v EMPLOYEE.IBAK EMPLOYEE.IB -user SYSDBA -pas masterkey -sep sepPass -decrypt backupKeyPass -se service_mgr
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top