As @mustaccio states, the Native Encryption feature was not available until DB2 10.5 Fixpack 5.
In addition, you must be licensed for the feature; It's included with DB2 Express-C, DB2 Advanced Workgroup Server Edition and DB2 Advanced Enterprise Server Edition. If you are running other editions (Express, Workgroup Server Edition or Enterprise Server Edition), you'll need to purchase a license for the feature.
Once your environment is sorted, to back up a non-encrypted database you will need to perform a few configuration steps:
- Create PCKS#12 keystone
- Generate a master key and add it to the keystore
- Set the
KEYSTORE_TYPE
and KEYSTORE_LOCATION
database manager configuration parameters
- (Optional) Set the
ENCRLIB
and ENCROPTS
database configuration parameters.
If you do not set the database configuration parameters, you'll have to specify them in the backup database
command. At a minimum, you must have the Master Key Label
option set to tell DB2 which master key to use for encrypting the data encryption key.
If you set the database configuration parameters, all database backups will be encrypted regardless of whether you specify the encrypt
option.