Hot Snap Backup

Hot Snap is not supported for a database with user-defined storage groups.

Hot Snap pauses archive writes and journal reaping before creating volume snapshots of the archive and journal of a single Storage Manager (SM) without requiring a database shutdown. Pausing archive writes and journal reaping does not affect the transaction commits or reads from the archives.

Once paused, the operator must initiate snapshot creation for the archive and journal volumes. Depending on whether the archive and journal are stored on the same volume or separate volumes, the snapshot may consist of either one or two snapshots. These snapshots may be created in any order. The snapshots will include transactions committed and journaled before pausing the archive and may also include transactions committed and journaled while archiving is paused. A snapshot may then be restored into a new volume.

After the snapshots are taken, the archive writes and journal reaping can be restarted.

Steps for Creating Snapshots of an SM

  1. Identify an SM.

  2. Pause archiving on the SM.

    nuocmd pause archiving --start-id <START_ID>

    By default, archiving is paused for 30 seconds, and a Pause ID is generated. This Pause ID must be provided in step 5.

    • To configure a different timeout value, see nuocmd pause archiving. Specify a shorter timeout value to prevent throttling of workload while archiving is paused.

    • Keep track of the journal disk usage while archiving is paused.

    • If nuocmd pause archiving is successful, it will return an exit code of 0.

  3. Create snapshots of archive and journal volumes of the SM.

  4. Wait for the archive and journal snapshots to complete.

  5. Resume archiving on the SM. Provide the Pause ID from step 2.

    nuocmd resume archiving --start-id <START_ID> --pause-id <PAUSE_ID>

    If this command reports an error, or if the exit code is non-zero, discard the snapshots and repeat from step 2.

    For more information, see nuocmd resume archiving.

Example

  1. Identify an SM.

    To view the processes running in the database:

    nuocmd show domain
    server version: 7.0.dev-0-e34c4943bb, server license: Enterprise
    server time: 2024-10-17T09:42:34.566, client token: f62fa52f9809ac47f458b1a5b7280c6b9029fb3d
    Servers:
    [nuoadmin-0] nuodev15:48005 [last_ack = 8.00] ACTIVE (LEADER, Leader=nuoadmin-0, log=0/17/17) Connected *
    Databases:
    db [state = RUNNING]
    [SM] nuodev15:48007 [start_id = 0] [server_id = nuoadmin-0] [pid = 1523189] [node_id = 1] [last_ack =  0.03] MONITORED:RUNNING
    [TE] nuodev15:48006 [start_id = 1] [server_id = nuoadmin-0] [pid = 1523197] [node_id = 2] [last_ack =  4.99] MONITORED:RUNNING

    The start ID of the SM is 0.

  2. Pause archiving on the SM.

    nuocmd pause archiving --start-id 0
    bc07e5d2-8c8d-11ef-8d1b-83859ace1384

    Archiving on the SM with the start ID 0 is paused. A pause ID is returned.

  3. Create snapshots of archive and journal volumes of the SM.

    For AWS cloud provider:

    To create a snapshot of the archive volume, use:

    aws ec2 create-snapshot \
    --volume-id archvol-28oct2024 \
    --description "Snapshot of my archive volume taken on 28 Oct, 2024"

    To create a snapshot of the journal volume, use:

    aws ec2 create-snapshot \
    --volume-id jrnlvol-28oct2024 \
    --description "Snapshot of my journal volume taken on 28 Oct, 2024"

    For Outscale:

    To create a snapshot of the archive volume, use:

    osc-cli api CreateSnapshot --profile "default" \
    --VolumeId "archvol-28oct2024" \
    --Description "Snapshot of my archive volume taken on 28 Oct, 2024"

    To create a snapshot of the journal volume, use:

    osc-cli api CreateSnapshot --profile "default" \
    --VolumeId "jrnlvol-28oct2024" \
    --Description "Snapshot of my journal volume taken on 28 Oct, 2024"

    To retrieve the details of the volume attached to the EC2 instance, use:

    aws ec2 describe-instances --instance-ids $(curl \
    -s http://169.254.169.254/latest/meta-data/instance-id) |\
    jq -r '.Reservations[].Instances[].BlockDeviceMappings[] | [ \
    .DeviceName , .Ebs.VolumeId ] | @tsv' /dev/xvda vol-01decefacff18f696
  4. Wait for the archive and journal snapshots to complete.

  5. Resume archiving on the SM.

    nuocmd resume archiving --start-id 0 --pause-id bc07e5d2-8c8d-11ef-8d1b-83859ace1384
    bc07e5d2-8c8d-11ef-8d1b-83859ace1384

    Pause ID is returned, indicating that archiving is resumed successfully. An exit code of 0 also indicates that archiving is resumed successfully.

    Archiving will resume regardless of the exit code (unless archiving was already resumed, in which case this command will do nothing).