MarkLogic 12 EA 1 Product Documentation
admin:database-set-backup-encryption-key

admin:database-set-backup-encryption-key(
   $config as element(configuration),
   $database-id as xs:unsignedLong,
   $backup-encryption-key as xs: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.:)
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy";

let $config := admin:get-configuration()
return
  admin:database-set-backup-encryption-key($config, xdmp:database("myDatabase"), "database-key")

  (: returns the new configuration element -- use admin:save-configuration 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