MarkLogic Server 11.0 Product Documentation
admin.databaseSetBackupEncryptionKey

admin.databaseSetBackupEncryptionKey(
   config as element(configuration),
   database-id as (Number|String),
   backup-encryption-key as String
) as element(configuration)

Summary

This function sets which key encryption key to use for encryption of backup for the database identified by database-id. This can only be set when an external KMS is configured.

Parameters
config A configuration specification, typically as returned from one of the Admin module functions.
database-id The ID of the database to set (for example, xdmp.database("myDatabase")).
backup-encryption-key A string represents the backup encryption key. It can be either cluster-key or database-key.

Example


//This configures the database to use the database key for backup encryption.
const admin = require('/MarkLogic/admin.xqy');
const config = admin.getConfiguration();

admin.databaseSetBackupEncryptionKey(config, xdmp.database('myDatabase'), 'database-key');

// Returns the new configuration element -- use admin.saveConfiguration to save
// the changes to the configuration or pass the configuration to other Admin API
// functions to make other changes. 
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy