restoreSettings

Syntax

restoreSettings(fileName, [overwrite=false])

Arguments

fileName is a STRING scalar specifying the backup file path. It can be an absolute path or relative path to <HomeDir>.

overwrite (optional) is a Boolean scalar indicating whether to overwrite the current settings with the backup setting files.

  • false (default): Not to overwrite the current settings. Only new users (along with permissions) and function views are added.

  • true: Delete current settings and overwrite with the backup files.

Details

Restore settings on users, permissions, and function views with files backed up with backupSettings to the current cluster.

This function can only be executed by an administrator on the controller. It can be used with backupSettings to back up and restore user settings when migrating databases.

Return value: A vector containing all restored user names and function views.

Examples

For a cluster with user A and B, restore permission settings on user A and C.

When overwrite=false, add user C and its permission to the cluster:

restoreSettings(fileName="/home/ddb/backup/permission.back", overwrite=false)

When overwrite=true, overwrite the user settings in the cluster:

restoreSettings(fileName="/home/ddb/backup/permission.back", overwrite=true)

Related function: backupSettings