Backups

Note

Operator 1.2.0 inadvertently removed two optional backup-related command-line parameters: backup-s3-endpoint and backup-compatibility-mode. You may remedy their absence by either:

  • Upgrading to Operator 1.2.1, which contains these parameters

  • Using CR spec backupSpec.s3Endpoint and backupSpec.compatibilityMode to specify their values

Backup Configurations

You may specify backup details via the backupSpec in the CR, using the fields following this example:.

backupSpec:
CloudServiceProvider: AWS
backupImage: gcr.io/singlestore-public/cellscripts:20230424161715-64bdc8ff
bucketName: 29fce172-3e50-41d9-9440-bf378475cc1b
s3Endpoint: http://10.43.241.252:8005
s3Region: us-west-1
schedule: 13 20 * * *
secretName: backup-credentials

Where:

  • CloudServiceProvider: Name of cloud service provider of the backup bucket (aws | azure | gcp).

  • backupImage: When unspecified, the Operator will use a default image.

  • bucketName: Name of the bucket in which to store backups of user databases.

  • compatibilityMode: Primarily for GCS, compatibility mode for backups of user databases. Refer to BACKUP DATABASE for more information.

  • objectMetaOverrides: Label and Annotation subfields allow for overriding the labels and annotations of the pods of the cronjob

  • s3Endpoint: Location of S3-compatible endpoint to use for backups of user databases.

  • s3Region: Name of the AWS S3 region in which the target bucket resides.

  • schedule: Default schedule for initial full backups of user databases, in cron format.

    If scheduleIncremental is specified, the scheduled job will perform a backup using BACKUP DATABASE ... WITH INIT ..., otherwise, it will perform a plain BACKUP DATABASE without using the WITH INIT option.

  • scheduleIncremental: Default schedule for incremental backups of user databases, in cron format.

    If this is configured, it will perform an incremental backup using BACKUP DATABASE ... WITH DIFFERENTIAL ... option if there is already a backup created by using WITH INIT option, otherwise the first time the incremental backup is run, it will perform a backup using WITH INIT option.

    You may define the schedule and/or scheduleIncremental using the following cron job scheduling format:

    Unit

    Description

    Value

    MIN

    Minute field

    0 to 59

    HOUR

    Hour field

    0 to 23

    DOM

    Day of Month

    1 to 31

    MON

    Month field

    1 to 12

    DOW

    Day of Week

    0 to 6

    For example:

                        +---------------- MIN
                        |  +------------- HOUR
                        |  |  +---------- DOM
                        |  |  | +-------- MON
                        |  |  | | +------ DOW
                        |  |  | | |
             schedule: 13 20  * * *

    Where:

    • deadlineSeconds: Default deadline in seconds in which a full backup job has to finish before it is terminated. Defaults to 3600 seconds if not specified.

    • deadlineSecondsIncremental: Default deadline in seconds in which an incremental backup has to finish before it is terminated. Defaults to 3600 seconds if not specified. It is suggested to make this value the same value as deadlineSeconds.

  • secretName: Name of the Secret containing credentials for use in S3 backup of user databases.

Last modified: February 6, 2024

Was this article helpful?