IRPCVaultsAdmin.RestoreVault
Administration API / specialized admin session
Restores a vault from backup files on the server and attaches it.
| Service | Vault management MFiles.IRPCVaultsAdmin |
|---|---|
| gRPC method | /MFiles.IRPCVaultsAdmin/RestoreVault |
| HTTP (mf-http-grpc) | POST /grpc/v1/restore-vault |
| Request | RestoreVaultRequest |
| Response | RestoreVaultResponse |
| Book and level | Administration API, specialized |
| Kind | admin |
| Session | Required: the session ID from LogIn in the mfiles-session-id-bin metadata. |
| Idempotent | no |
| Returns metadata structure version | no |
| Streaming | none (unary) |
Remarks
- Long-running. With
synchronousfalse the call starts a background job and returns before it completes; follow it withtask_id(see the service overview). Withsynchronoustrue the call returns when the restore is done. - Requires the system administrator server role (server right
restore_vault). - The backup files are read by the server: paths are on the server machine. Inspect a backup with GetBackupFileContents first.
restore_job.overwrite_existing_filestrue lets the restore overwrite existing files in the target location.
Request: RestoreVaultRequest
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
restore_job | RestoreJob | The backup files to restore and the definition of the restored vault. If target_vault.vault.guid is the null GUID, the vault keeps the GUID stored in the backup. |
restore_job.full_backup_file | string | Full path to the backup file on server (full backup). |
restore_job.differential_backup_file | string | Full path to the backup file on server (differential backup, optional). |
restore_job.target_vault | Vault | The definition of the vault. If the GUID field is GUID_NULL, the restored vault uses the GUID specified in the backup files. Otherwise, it uses the given GUID (= restore to a different identity). |
restore_job.target_vault.vault | VaultBasic | Basic data. |
restore_job.target_vault.main_data_folder | string | The main physical folder of this vault on the server (e.g. C:\Program Files\M-Files\Server Vaults\MyVault). |
restore_job.target_vault.additional_data_folders[] | repeated AdditionalFolder | The specification of the additional file data folders. |
restore_job.target_vault.database_info | SQLDatabase | The vault's SQL database. |
restore_job.target_vault.file_data_storage | FileDataStorage | Identifies file data storage to use. Typically specifies that the file data storage is determined automatically.Values: FILE_DATA_STORAGE_DEFAULT (0), FILE_DATA_STORAGE_DISK (1), FILE_DATA_STORAGE_DATABASE (2), FILE_DATA_STORAGE_EXTERNAL (3), FILE_DATA_STORAGE_MASTER (4). |
restore_job.target_vault.file_data_connection_string | string | The connection string that identifies the location, protocol, and credentials for the file data storage of this vault. For example, this might specify a storage account, a protocol, and a container name for Azure's BLOB Services. Can be unset or empty. |
restore_job.overwrite_existing_files | bool | If true, existing target files are overwritten. If false, restore fails if a target file already exists. |
restore_job.impersonation | Impersonation | Impersonation information for accessing the backup file on server. |
restore_job.impersonation.type | ImpersonationType | Impersonation type.Values: IMPERSONATION_TYPE_SYSTEM_ACCOUNT (0), IMPERSONATION_TYPE_LOCAL_WINDOWS_ACCOUNT (1), IMPERSONATION_TYPE_EXTERNAL_ACCOUNT (2). |
restore_job.impersonation.account | string | Account name (e.g. DOMAIN\user). |
restore_job.impersonation.encrypted_password | bytes | Encrypted password. |
restore_job.vault_attach_options | AttachVaultOptions | Options for controlling the attaching of the vault. |
restore_job.vault_attach_options.disable | ExternalConnectionOptions | Which vault's external data connection points must be put disabled? |
restore_job.vault_attach_options.update_attachment_guid | bool | Specify true if the attachment GUID should be updated. Usually, it is desirable to update the attachment GUID each time the vault is re-attached. |
restore_job.vault_attach_options.fail_attach_if_bring_online_fails | bool | A flag that controls if attaching the vault must fail if its online operations do not start successfully. Typically this is false meaning that starting online operations can fail although attaching the vault succeeds. |
restore_job.vault_attach_options.enforce_file_data_encryption | bool | A flag that controls if file data encryption should be turned on in the vault when it is attached. |
restore_job.vault_attach_options.disable_local_indexes | bool | A flag that controls if the local indexes such as dtSearch are disabled when the vault is attached. |
restore_job.vault_attach_options.allow_only_vault_temp_path_for_content_replication | bool | If true the temporary processing location of cloud replication jobs are cleared and other replication jobs are disabled. |
restore_job.vault_attach_options.ignore_vault_external_data_connection_points | bool | If true vault's external data connection points are ignored when vault is already in msm cluster. |
synchronous | bool | True to restore within the call. False to start a background job and return at once. |
Response: RestoreVaultResponse
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
task_id | int32 | The ID of the server-level restore job when synchronous is false; -1 when it is true. |
output_info | RestoreJobOutputInfo | The restored vault when synchronous is true; empty otherwise (read the result from the job's output). |
output_info.restored_vault | Vault | Receives the full definition of the restored vault. |
output_info.restored_vault.vault | VaultBasic | Basic data. |
output_info.restored_vault.main_data_folder | string | The main physical folder of this vault on the server (e.g. C:\Program Files\M-Files\Server Vaults\MyVault). |
output_info.restored_vault.additional_data_folders[] | repeated AdditionalFolder | The specification of the additional file data folders. |
output_info.restored_vault.database_info | SQLDatabase | The vault's SQL database. |
output_info.restored_vault.file_data_storage | FileDataStorage | Identifies file data storage to use. Typically specifies that the file data storage is determined automatically.Values: FILE_DATA_STORAGE_DEFAULT (0), FILE_DATA_STORAGE_DISK (1), FILE_DATA_STORAGE_DATABASE (2), FILE_DATA_STORAGE_EXTERNAL (3), FILE_DATA_STORAGE_MASTER (4). |
output_info.restored_vault.file_data_connection_string | string | The connection string that identifies the location, protocol, and credentials for the file data storage of this vault. For example, this might specify a storage account, a protocol, and a container name for Azure's BLOB Services. Can be unset or empty. |
Related methods
- GetBackupFileContents -- Reads the vault identity and data folders stored in a backup file on the server.