# IRPCServerAdmin.BackUpMasterDB

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [Server administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/BackUpMasterDB/

Badges: `Administration API / specialized` `admin` `session`

Backs up the server's master database to a file on the server, and returns when the backup is
complete.

- **Service:** [Server administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/index.md) `MFiles.IRPCServerAdmin`
- **gRPC method:** `/MFiles.IRPCServerAdmin/BackUpMasterDB`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/back-up-master-db`
- **Request:** [`BackUpMasterDBRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/BackUpMasterDB/index.md#request)
- **Response:** [`BackUpMasterDBResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/BackUpMasterDB/index.md#response)
- **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)

<a id="remarks"></a>

## Remarks

- Requires the system administrator server role (server right `backup_master_database`).
- The path is on the server computer. The file is written as the account in
  `utf8szimpersonation` (the server's own account when it is the system account).
- Runs synchronously. To run it as a cancellable job instead, use
  [BackUp](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/BackUp/index.md) with a `BackupJob` whose `vault_guid` is the null
  GUID.

<a id="request"></a>

## Request: BackUpMasterDBRequest

> 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 |
|---|---|---|
| `target_file` | `string` | Full path of the backup file on the server computer. |
| `utf8szimpersonation` | [`Impersonation`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Impersonation/index.md) | The account used to write the backup file. See [Impersonation](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Impersonation/index.md). |
| `utf8szimpersonation.type` | [`ImpersonationType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ImpersonationType/index.md) | Impersonation type. Values: `IMPERSONATION_TYPE_SYSTEM_ACCOUNT` (0), `IMPERSONATION_TYPE_LOCAL_WINDOWS_ACCOUNT` (1), `IMPERSONATION_TYPE_EXTERNAL_ACCOUNT` (2). |
| `utf8szimpersonation.account` | `string` | Account name (e.g. DOMAIN\user). |
| `utf8szimpersonation.encrypted_password` | `bytes` | Encrypted password. |
| `overwrite_existing_files` | `bool` | True to overwrite existing files; false fails if a target file exists. |
| `file_size_limit_in_mb` | `uint32` | The maximum size of one backup file in megabytes; larger backups continue in sequentially numbered files. 0 means a single file of any size. |

<a id="response"></a>

## Response: BackUpMasterDBResponse

No fields.

<a id="related"></a>

## Related methods

- [BackUp](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/BackUp/index.md): Starts a backup of a vault or of the master database as a server job and returns the job ID.
