Table of Contents
Last updated: 2024-11-14

Checkpoint


The ShareAspace checkpointing feature serves three purposes:

  • Enables the failover functionality where a secondary passive host node can be triggered to load a checkpoint if the primary host node goes down.
  • Act as a backup feature where each created checkpoint is a full backup of a the databases for collection, all spaces, and all indexes for a ShareAspace installation. The checkpoints can be downloaded:
    • for archiving.
    • for moving a database from for example a production environment to a test environment.
  • Used for extracting the full data set in order to run offline exports.

Checkpoints can be created manually using the checkpoint API but ShareAspace can also be configured to automatically create checkpoints for certain system events or at the time that the journaling kept after a checkpoint is created reaches a configured threshold.

To activate automatic checkpointing see the ShareAspace Host installation section.

Important

The checkpoint functionality will only backup the ShareAspace databases (collection, spaces, and indexes). The file vault must be backed up separately.

API


Note

That only users that are collection administrators can run the ShareAspace checkpoint API.

List all checkpoints

Lists all the available checkpoints for the space defined in the route only

GET /space/{spaceId}/checkpoint
Authorization: {authorizationHeaderValue}
Content-Type: application/json
{
  "href": "https://fqdn/api/space/test/checkpoint",
  "data": [
    {
      "href": "https://fqdn/api/collection/checkpoint/3",
      "data": {
        "description": "Checkpoint 1 description",
        "time": "2023-06-16T16:55:28.0760109Z"
      },
      "links": [
          {
            "rel": "restore",
            "href": "https://fqdn/api/collection/checkpoint/3",
            "method": "POST"
          },
          {
            "rel": "delete",
            "href": "https://fqdn/api/collection/checkpoint/3",
            "method": "DELETE"
          },
          {
            "rel": "download",
            "href": "https://fqdn/api/collection/checkpoint/3/download",
            "method": "GET"
          }
      ]
    }
  ]
}
Note

The corresponding checkpoint file in the file vault is named after the id returned in the response:

FileVault/checkpoint/
    |-- Checkpoint-000000003

A checkpoint file is a ZIP file containing the space index and the space store files.

Create a checkpoint

Creates a space checkpoint including indexes for the space defined in the route.

Tip

Using the admin API it is possible to checkpoint all the spaces of an installation, see Host node installation documentation.

POST /space/{spaceId}/checkpoint
Authorization: {{authorization}}
Content-Type: application/json

{
    "description": "Checkpoint 1 description"
}

Get a checkpoint

Returns information about a specific space checkpoint.

GET /space/{spaceId}/checkpoint/{id}
Authorization: {authorizationHeaderValue}
Content-Type: application/json
{
  "href": "https://fqdn/api/collection/checkpoint/3",
  "data": {
    "description": "Checkpoint 1 description",
    "time": "2023-06-16T16:55:28.0760109Z"
  },
  "links": [
    {
      "rel": "restore",
      "href": "https://fqdn/api/collection/checkpoint/3",
      "method": "POST"
    },
    {
      "rel": "delete",
      "href": "https://fqdn/api/collection/checkpoint/3",
      "method": "DELETE"
    },
    {
      "rel": "download",
      "href": "https://fqdn/api/collection/checkpoint/3/download",
      "method": "GET"
    }
  ]
}

Download checkpoint

Returns a file stream of a specific space checkpoint.

GET /space/{spaceId}/checkpoint/{id}/download
Authorization: {authorizationHeaderValue}

Restore a checkpoint

Restores a specific checkpoint.

Tip

In order to restore a space checkpoint from a source host collection to a target host collection, the only requirement is to have the template exact same version of that space already loaded into the target host collection.

  • Copy the source checkpoint file (located under the file vault folder FileVault/checkpoint) to the target file vault folder FileVault/checkpoint
  • Copy the source space file vault folder (located under the file vault folder FileVault/space/MySpace) to the target file fault folder FileVault/space/MySpace
  • Call the checkpoint restore
POST /space/{spaceId}/checkpoint/{id}
Authorization: {authorizationHeaderValue}

Delete a checkpoint

Deletes a specific checkpoint.

DELETE /space/{spaceId}/checkpoint/{id}
Authorization: {authorizationHeaderValue}