> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xloud.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Snapshots

> Create, manage, and restore XSDS volume snapshots for point-in-time recovery, data cloning, and pre-maintenance protection.

## Overview

Snapshots capture the state of a volume at a specific point in time. They are
space-efficient — only changed blocks are stored after the initial snapshot is taken.
Snapshots can be used to restore a volume to a previous state or to create new volumes
pre-populated with the same data.

<Note>
  **Prerequisites**

  * An active Xloud account with project member access
  * Source volume must exist and be accessible
  * Sufficient snapshot quota in your project (check with your administrator)
</Note>

***

## Creating Snapshots

<Tabs>
  <Tab title="Dashboard" icon="gauge">
    <Steps titleSize="h3">
      <Step title="Navigate to Volumes" icon="hard-drive">
        Navigate to
        **Project → Volumes → Volumes**.
      </Step>

      <Step title="Create a snapshot" icon="copy">
        In the volume list, click the **Actions** dropdown next to the target volume and
        select **Create Snapshot**.

        | Field             | Description                                         |
        | ----------------- | --------------------------------------------------- |
        | **Snapshot Name** | Descriptive name including date or context          |
        | **Description**   | Optional — notes about the purpose of this snapshot |

        <Tip>
          Take snapshots before making significant configuration changes or before
          applying OS patches. Use a naming convention that includes the date:
          `myvolume-2026-03-18-pre-upgrade`.
        </Tip>
      </Step>

      <Step title="Verify the snapshot" icon="circle-check">
        Navigate to **Project → Volumes → Snapshots**. The snapshot displays with
        status **Available**.

        <Check>Snapshot is available and ready for restore or volume creation.</Check>
      </Step>
    </Steps>
  </Tab>

  <Tab title="CLI" icon="terminal">
    <Steps titleSize="h3">
      <Step title="Authenticate" icon="key">
        ```bash title="Load credentials" theme={null}
        source openrc.sh
        ```
      </Step>

      <Step title="Create a snapshot" icon="copy">
        ```bash title="Create volume snapshot" theme={null}
        openstack volume snapshot create \
          --volume <VOLUME_NAME_OR_ID> \
          --description "Pre-maintenance snapshot $(date +%Y-%m-%d)" \
          snapshot-$(date +%Y%m%d)
        ```
      </Step>

      <Step title="Verify the snapshot" icon="circle-check">
        ```bash title="List snapshots" theme={null}
        openstack volume snapshot list
        ```

        ```bash title="Show snapshot details" theme={null}
        openstack volume snapshot show snapshot-$(date +%Y%m%d)
        ```

        Confirm `status` shows `available`.

        <Check>Status field shows `available` — snapshot is ready.</Check>
      </Step>
    </Steps>
  </Tab>
</Tabs>

***

## Restoring from Snapshots

<Tabs>
  <Tab title="Create Volume from Snapshot" icon="gauge">
    Create a new volume pre-populated with the snapshot data. This is the primary
    restore method — the original volume is preserved.

    <Steps titleSize="h3">
      <Step title="Locate the snapshot" icon="search">
        Navigate to **Project → Volumes → Snapshots** and find the snapshot to restore.
      </Step>

      <Step title="Create a volume from the snapshot" icon="plus">
        Click **Actions → Create Volume** next to the snapshot.

        | Field           | Value                                             |
        | --------------- | ------------------------------------------------- |
        | **Volume Name** | Descriptive name for the restored volume          |
        | **Size**        | Must be equal to or larger than the snapshot size |
        | **Volume Type** | Select the appropriate storage tier               |

        <Tip>
          You can increase the volume size when restoring. This is useful when
          you need the restored data plus additional free space.
        </Tip>
      </Step>

      <Step title="Attach and mount the restored volume" icon="hard-drive">
        Attach the restored volume to the target instance:

        ```bash title="Attach restored volume" theme={null}
        openstack server add volume <INSTANCE_ID> <RESTORED_VOLUME_NAME>
        ```

        <Check>The restored volume appears as a new block device and contains
        the data from the snapshot point in time.</Check>
      </Step>
    </Steps>
  </Tab>

  <Tab title="CLI Restore" icon="terminal">
    ```bash title="Create volume from snapshot" theme={null}
    openstack volume create \
      --snapshot <SNAPSHOT_NAME_OR_ID> \
      --size <SIZE_GB> \
      --type ceph-ssd \
      restored-volume-$(date +%Y%m%d)
    ```

    ```bash title="Verify the volume is available" theme={null}
    openstack volume show restored-volume-$(date +%Y%m%d) -c status
    ```

    ```bash title="Attach to instance" theme={null}
    openstack server add volume <INSTANCE_ID> restored-volume-$(date +%Y%m%d)
    ```
  </Tab>
</Tabs>

***

## Managing Snapshots

<Tabs>
  <Tab title="Dashboard" icon="gauge">
    Navigate to **Project → Volumes → Snapshots** to manage all project snapshots.

    Available actions:

    * **Create Volume** — create a new volume from the snapshot
    * **Edit Snapshot** — update the name or description
    * **Delete Snapshot** — permanently remove the snapshot

    <Warning>
      Snapshot deletion is permanent. Ensure the snapshot is no longer needed before
      deleting. A snapshot cannot be deleted if a volume was created from it and that
      volume still exists.
    </Warning>
  </Tab>

  <Tab title="CLI" icon="terminal">
    ```bash title="List all snapshots" theme={null}
    openstack volume snapshot list --long
    ```

    ```bash title="Delete a snapshot" theme={null}
    openstack volume snapshot delete <SNAPSHOT_NAME_OR_ID>
    ```

    ```bash title="Check project snapshot quota" theme={null}
    openstack quota show --volume
    ```

    <Warning>
      Before deleting a snapshot, verify no volumes depend on it. Deleting a parent
      snapshot while dependent volumes exist is blocked — you must delete the child
      volumes first.
    </Warning>
  </Tab>
</Tabs>

***

## Consistency Considerations

<AccordionGroup>
  <Accordion title="Crash-consistent snapshots" icon="hard-drive">
    By default, XSDS snapshots are crash-consistent — they capture the on-disk state
    at the moment of the snapshot request. This is equivalent to pulling the power cord
    from the machine and is safe for most file systems (ext4, XFS) that use journaling
    for recovery.

    However, for databases and stateful applications, crash-consistent snapshots may
    capture in-flight transactions in an inconsistent state. The database will recover
    on next startup, but some in-flight transactions may be lost.
  </Accordion>

  <Accordion title="Application-consistent snapshots" icon="shield">
    For databases and transactional applications, coordinate the snapshot with
    application-level freeze/thaw procedures:

    ```bash title="PostgreSQL: flush and freeze" theme={null}
    psql -c "SELECT pg_start_backup('snapshot', true);"
    # Create the snapshot now
    openstack volume snapshot create --volume <VOL> snapshot-$(date +%Y%m%d)
    psql -c "SELECT pg_stop_backup();"
    ```

    ```bash title="MySQL: flush tables with read lock" theme={null}
    mysql -e "FLUSH TABLES WITH READ LOCK;"
    # Create the snapshot now
    openstack volume snapshot create --volume <VOL> snapshot-$(date +%Y%m%d)
    mysql -e "UNLOCK TABLES;"
    ```

    <Tip>
      For consistent multi-volume snapshots across a database and its transaction logs,
      freeze all volumes simultaneously before taking snapshots. This ensures the volumes
      are in a mutually consistent state.
    </Tip>
  </Accordion>
</AccordionGroup>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Data Protection" href="/services/sds/user-guide/data-protection" color="#197560">
    Pool-level replication and erasure coding for hardware failure protection
  </Card>

  <Card title="Disaster Recovery" href="/services/disaster-recovery/user-guide" color="#197560">
    Replicate volumes to a DR site for site-level failure protection
  </Card>

  <Card title="Block Storage Snapshots" href="/services/storage/snapshots" color="#197560">
    Full lifecycle management for block volume snapshots
  </Card>

  <Card title="Troubleshooting" href="/services/sds/user-guide/troubleshooting" color="#197560">
    Diagnose snapshot creation failures and stuck snapshot states
  </Card>
</CardGroup>
