# ArchiveDocsJob

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.ArchiveDocsJob/

Struct for a job of archiving whole documents.

- **Full name:** `MFiles.ArchiveDocsJob`
- **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-target_path"></a>`target_path` | `string` | 1 | Full path to the target file on server. |
| <a id="f-impersonation"></a>`impersonation` | [`Impersonation`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Impersonation/index.md) | 2 | Impersonation information for accessing the archive target files on server. |
| <a id="f-options"></a>`options` | [`OBJARCHIVINGFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.OBJARCHIVINGFLAGS/index.md) | 3 | Bit flags that control the execution of this archiving job. |
| <a id="f-object_filter"></a>`object_filter` | [`SearchConditionArray`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SearchConditionArray/index.md) | 4 | The conditions that limit the object set of this archiving job. |
| <a id="f-last_run_timestamp_utc"></a>`last_run_timestamp_utc` | [`google.protobuf.Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | 5 | If indicated by OBJARCHIVINGFLAG_DELTA, only changes newer than this timestamp are archived. In UTC. |
| <a id="f-structure_items"></a>`structure_items` | repeated [`ExportStructureItem`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ExportStructureItem/index.md) | 6 | The metadata structure items which will be exported. |
| <a id="f-cloud_storage_connection_string"></a>`cloud_storage_connection_string` | `string` | 7 | Full path to the target file on server. |
| <a id="f-cloud_storage_password"></a>`cloud_storage_password` | `string` | 8 | Full path to the target file on server. |
| <a id="f-configuration_id"></a>`configuration_id` | `string` | 9 | Configuration id of this archiving job. |

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

## Used by methods

- [IRPCVaultAdmin.ArchiveDocuments](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultAdmin/ArchiveDocuments/index.md): Exports (archives) the objects that match a filter into an archive package, or previews how many would be archived.

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

## Used in fields

- [`JobDataUnion.archive_objects`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.JobDataUnion/index.md#f-archive_objects): Archiving documents job.
- [`ArchiveDocumentsRequest.archive_job`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultAdmin/ArchiveDocuments/index.md#request): The objects to archive (`object_filter`), the destination and the options.
