# CopyVaultJob

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

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

Struct for a vault copying job.

- **Full name:** `MFiles.CopyVaultJob`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-source_vault"></a>`source_vault` | `string` | 1 | The GUID of the vault to copy. |
| <a id="f-options"></a>`options` | [`COPYFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.COPYFLAGS/index.md) | 2 | Flags that tell which data parts should be copied. |
| <a id="f-target_vault"></a>`target_vault` | [`Vault`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Vault/index.md) | 3 | The definition of the target vault. The GUID field is ignored. The server will generate a new GUID for the new vault. |
| <a id="f-attach_vault_options"></a>`attach_vault_options` | [`AttachVaultOptions`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AttachVaultOptions/index.md) | 4 | Options for controlling the attaching of the vault. |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCVaultsAdmin.CopyVault](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/CopyVault/index.md): Copies the specified vault into a new vault (creates the target vault).

<a id="used-in-fields"></a>

## Used in fields

- [`JobDataUnion.copy_vault`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.JobDataUnion/index.md#f-copy_vault): Vault copying job.
- [`CopyVaultRequest.copy_job`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/CopyVault/index.md#request): The vault to copy (`source_vault`), what to copy (`options`) and the definition of the new vault (`target_vault`).
