- URL:https://<root>/system/disasterrecovery/stores/register
- Required Capability:Default administrator role | Security and infrastructure
- Version Introduced:10.9
Description
The register operation registers a backup store. The backup store is created and managed by the deployment.
Request parameters
Parameter | Details |
---|---|
storeName (Required) | The backup store name. |
settings (Required) | Caution:Support for cloud storage has been added at ArcGIS Enterprise on Kubernetes 11.1 as a beta feature. Beta features may not be feature complete, are not fully supported, and may have known performance issues. See the ArcGIS Enterprise on Kubernetes Beta features documentation for more information. The JSON describing the storage configuration for the backup store. It can use either file-based storage or cloud storage. For more information, see the Settings properties section below. |
isDefault (Required) | Specifies whether the store will be the default backup store (true). The default value is false. Values: true | false |
async | Introduced at 11.0. This parameter specifies whether the operation will run synchronously or asynchronously. If false, the operation is run synchronously. If true, the operation is run asynchronously and the response returns a JSON object containing job information that can be used to track the job's status. The default value is false. Values: true | false |
f | The response format. The default format is html. Values: html | json | pjson |
Settings properties
The following information pertains to the different storage options (file-based storage or cloud storage) available for a backup store.
File-based storage
If the backup store uses file-based storage, the storage configuration will use persistent volumes that can either be statically provisioned and bound by label selectors or dynamically provisioned. The following table outlines the properties for file-based storage configuration:
Property | Details |
---|---|
provisioningType | The provisioning type. Values: STATIC | DYNAMIC |
storageClass | The storage class. |
size | The size for the persistent volume. The minimum size requirement is 16 GB. |
labels | A key:value pair to identify and bind to a persistent volume. |
STATIC JSON examples
The following example demonstrates the storageConfig syntax when using a STATIC provisioning type:
{
"provisioningType": "STATIC",
"storageClass": "backups",
"size": "64Gi",
"labels": {
"arcgis/purpose": "backups"
}
}
The following example demonstrates the full JSON for the settings parameter using STATIC provisioning and label selectors:
{
"type": "HOSTED",
"storageConfig": {
"provisioningType": "STATIC",
"storageClass": "backups",
"size": "64Gi",
"labels": {
"arcgis/purpose": "backups"
}
}
}
DYNAMIC JSON examples
The following example demonstrates the storageConfig syntax when using a DYNAMIC provisioning type:
{
"size": "64Gi",
"provisioningType": "DYNAMIC",
"storageClass": "backups"
}
The following example demonstrates the full JSON for the settings parameter using DYNAMIC provisioning:
{
"type": "HOSTED",
"storageConfig": {
"size": "64Gi",
"provisioningType": "DYNAMIC",
"storageClass": "backups"
}
}
Cloud storage
If the backup store uses native cloud storage, the JSON for the settings parameter must include relevant properties for the storage provider. Supported cloud storage locations are Amazon Simple Storage Service (S3), Azure Blob Storage, and Google Cloud Storage (GCS).
The JSON for cloud storage configuration contains two main sections:
- provider—Defines how to connect and the credentials to use
- service—Includes the bucket or container to use, as well as region information (if relevant)
Amazon S3
The following example shows the JSON properties needed for the settings parameter when using Amazon S3 cloud storage, as well as the access keys for the backup store:
{
"type": "S3",
"provider": {
"name": "AWS",
"connection": {
"type": "access-key",
"info": {
"secret_key": "<secret key>",
"access_key": "<access key>"
}
}
},
"service": {
"name": "AWS S3",
"type": "objectStore",
"usages": ["BACKUP"],
"connection": {
"type": "object-storage-access",
"info": {
"bucket_name": "<bucket name>",
"region": "<region>",
"rootDir": "<root prefix>"
}
},
"category": "storage"
}
}
The following example shows the JSON properties needed for the settings parameter when using an AWS Identity and Access Management (IAM) role:
Note:
The cluster nodes should also be configured with an IAM role.
{
"type": "S3",
"provider": {
"name": "AWS",
"connection": {
"type": "access-IAM-role"
}
},
"service": {
"name": "AWS S3",
"type": "objectStore",
"usages": ["BACKUP"],
"connection": {
"type": "object-storage-access",
"info": {
"bucket_name": "<bucket name>",
"region": "<region>",
"rootDir": "<root prefix>"
}
},
"category": "storage"
}
}
Azure Blob Storage
The following example shows the JSON properties needed for the settings parameter when using Azure Blob Storage:
{
"type": "AZURE_BLOBSTORE",
"provider": {
"name": "AZURE",
"connection": {
"type": "account-key",
"info": {
"account_name": "<storage account name>",
"account_key": "<account key>"
}
}
},
"service": {
"name": "Azure Blob Store",
"type": "objectStore",
"usages": ["BACKUP"],
"connection": {
"type": "object-storage-access",
"info": {
"container_name": "<container name>",
"rootDir": "<root folder>"
}
},
"category": "storage"
}
}
Google Cloud Storage
The following example shows the JSON properties needed for the settings parameter when using GCS with access keys and secret keys:
{
"type": "GCS",
"provider": {
"name": "GCP",
"connection": {
"type": "access-key",
"info": {
"access_key": "<access key>",
"secret_key": "<secret key>"
}
}
},
"service": {
"name": "Google Cloud Storage",
"connection": {
"type": "object-storage-access",
"info": {
"bucket_name": "<bucket>",
"rootDir": "<root prefix>"
}
},
"usages": ["BACKUP"],
"type": "objectStore",
"category": "storage"
}
}
Example usage
The following is a sample POST request for the register operation that demonstrates registering a backup store that uses dynamically provisioned file-based storage:
POST /context/admin/system/disasterrecovery/stores/register HTTP/1.1
Host: organization.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
storeName=backupDefault&settings={"type": "HOSTED","storageConfig": {"size": "64Gi","provisioningType": "DYNAMIC","storageClass": "backups"}}&isDefault=true&async=false&f=pjson&token=Mb0ORrkLObNO2Q8FZoUCHHzSMzZi0CbhLHNRYMqqa6URG_ojQJF3rNsJAfRB23MyCrLwSmuaHPUo4AEIrUuoH1-4Ot5xh4565FtlQahXAhK2C7Sy0oydZhBwD8KdFSnVlnLr-
JSON Response example
If async is false, the following response is returned when a backup store has been registered successfully:
{
"default": true,
"storageConfig": {"storageClassName": "backups"},
"identity": "uh1rxq3x6x2zk1cxwtli",
"name": "backups2",
"identityKey": "zNUgyzzhuA6L6rSuD1RQUth/PWeg87/RVaGjDFpv2Ic=",
"rootDir": "rootdir",
"type": "HOSTED",
"autoShutdown": true,
"status": "success"
}
If async is true, the response returns a JSON object containing job information. The value returned for the jobsUrl property can be used to access the job resource, which can be polled to return updated job status information. For more information, see the Job resource topic.
{
"jobsUrl": "https://organization.domain.com/context/admin/jobs/j7c8820d0-ea2f-427a-ab6f-a8cc2c927fe4",
"jobid": "j7c8820d0-ea2f-427a-ab6f-a8cc2c927fe4",
"status": "SUBMITTED"
}