Skip to main content
Version: 2.9.X

Backup and Restore Guide

This guide describes how to back up and restore Cogynt data.

Backing Up Data

Data backup methods are defined in the Cogynt cluster's environment manifest file (typically ia.env.yaml). For more information about the environment manifest file, refer to Configuring the Cogynt Delivery Tool in the Cogynt DevOps Guide.

Adding Backup Capabilities

Backup information is defined in the spec > backup section of the environment manifest file. This section is not included in the default ia.env.yaml that Cogility provides, and must be added manually.

To add backup capabilities, add the following lines to the environment manifest file:

spec:
...
backup:
enabled:
schedule:
backupBucket:
eksRoleArn:
gcpServiceAccount:

Note

Include eksRoleArn for AWS deployments. Include gcpServiceAccount for GCP deployments. Do not use both fields at the same time.

The backup fields are as follows:

  • enabled: Determines whether backup is enabled or not. For more information, see Enabling and Disabling Backup.
  • schedule: A cron expression that determines the frequency of backup operations. For more information, see Setting Backup Schedule.
  • backupBucket: Specifies the bucket where the data is backed up. For more information, see Setting Backup Buckets.
  • eksRoleArn or gcpServiceAccount: Determines the role that performs the backup. For more information, see Setting Backup Roles.

Enabling and Disabling Backup

After backup capabilites have been added, backup can be enabled or disabled by modifying the value of the enabled field:

  • Set enabled to true to enable backup.
  • Set enabled to false to disable backup.

If enabled is set to true, backup proceeds according to the configuration defined by the remaining backup fields. For more information, see Configuring Backup.

Configuring Backup

Configuring backup consists of defining three components:

  1. The backup schedule.
  2. The location (bucket) where the backup is stored.
  3. The cluster role that performs the backup.

The process to define each component is described in detail under the corresponding topic heading.

Setting Backup Schedule

The schedule field determines the backup schedule. It accepts a cron expression between quotation marks (for example, "30 3 * * 0").

Cron syntax consists of five fields, each indicating a specific time value. In Cogynt, the format is "m H D M W", where:

  • m indicates the minute of the hour when backup occurs. The accepted range is 0 to 59.
  • H indicates the hour when backup occurs. The accepted range is 0 to 23, following 24-hour notation.
  • D indicates the day of the month when backup occurs. The accepted range is 0 to 31.
  • M indicates the month when backup occurs. The accepted range is 1 (January) to 12 (December).
  • W indicates the day of the week when backup occurs. The accepted range is 0 (Sunday) to 6 (Saturday).

Note

Do not leave any of the fields blank.

Standard cron operators, such as *, may also be used.

For more information about cron syntax and operators, refer to the Linux Manual's crontab documentation.

Setting Backup Buckets

The backupBucket field determines the location where backup data is stored.

The typical input follows the format <CONNECTOR>://cogynt-data/<FOLDER>, where:

  • <CONNECTOR> indicates the type of connector to use. For AWS deployments, s3 is used. For GCP deployments, gs is used.
  • <FOLDER> indicates the place in the Kubernetes cluster where the backup data should be saved (for example, username/backup).

Setting Backup Roles

The backup role field (either eksRoleArn for AWS deployments, or gcpServiceAccount field for GCP deployments) determines the cluster role that performs the data backup.

The typical eksRoleArn field input follows the syntax arn:aws:iam::<ACCOUNT ID>:role/<NODE ROLE>, where:

  • <ACCOUNT ID> is a sequence of numerical digits indicating the AWS account ID. (This ID is used throughout the manifest file.)
  • <NODE ROLE> is the role that should perform data backup. Cogynt's Terraform scripts include a role that can be used for this purpose. However, any role or name can be used, including ones that customers make for themselves.

The typical gcpServiceAccount field input is the service account name to use (for example, cogynt@cogynt.iam.gserviceaccount.com).

Restoring Data

The pod that performs the backup operations for the Cogynt cluster includes a restore script. The script can be manually run to restore the data from the backup bucket.

Since all Cogynt data is backed up in the bucket, individual pieces of data can be manually restored from it using the typical methods for Kubernetes cluster applications.

For assistance with restoring data, contact Cogility Support.