A GlusterFS snapshot restore is a rollback operation for a volume whose contents must return to an earlier point-in-time copy. It belongs in a planned outage or recovery window because the volume has to be stopped before the restore command can succeed, and newer writes are discarded.

Snapshots are tracked by name across the trusted storage pool, but gluster snapshot restore takes the snapshot name rather than the volume name. Checking the snapshot metadata before stopping the volume prevents a rollback to the wrong timestamp or wrong volume, especially when snapshot names follow a shared rotation pattern.

After a successful restore, GlusterFS removes that snapshot from the available snapshot list. Keep an off-cluster backup for recovery points that must survive beyond a restore, and handle geo-replicated volumes as paired restores so the primary and secondary volumes do not resume from different snapshot points.

Steps to restore a GlusterFS snapshot:

  1. List snapshots for the target volume.
    $ sudo gluster snapshot list volume1
    snap-volume1-2025-01-10
    snap-volume1-2025-01-17

    Use gluster snapshot list without a volume name only when the cluster has few snapshots and cross-volume output will not confuse the recovery point.

  2. Inspect the snapshot metadata.
    $ sudo gluster snapshot info snap-volume1-2025-01-10
    Snapshot                  : snap-volume1-2025-01-10
    Snapshot UUID             : 3c1a9d8a-92b1-46d0-9e2f-2e90103a2e8c
    Volume Name               : volume1
    Created                   : 2025-01-10 12:05:14
    Status                    : Activated
    ##### snipped #####

    Restore only after the snapshot name, volume name, and creation time match the intended recovery point.

  3. Check brick status before the outage.
    $ sudo gluster volume status volume1
    Status of volume: volume1
    Gluster process                             TCP Port  RDMA Port  Online  Pid
    ------------------------------------------------------------------------------
    Brick gfs1.example.net:/bricks/volume1       49152     0          Y       2274
    Brick gfs2.example.net:/bricks/volume1       49152     0          Y       2291
    Self-heal Daemon on gfs1.example.net         N/A       N/A        Y       2150
    Self-heal Daemon on gfs2.example.net         N/A       N/A        Y       2168

    Resolve offline bricks or disconnected peers before restoring, because the rollback changes brick data across the trusted storage pool.

  4. Stop application writes to the volume.

    Writes accepted after the selected snapshot timestamp are lost when the restore completes.

  5. Stop the volume.
    $ sudo gluster volume stop volume1
    Stopping volume will make its data inaccessible. Do you want to continue? (y/n) y
    volume stop: volume1: success
  6. Confirm the volume is stopped.
    $ sudo gluster volume info volume1
    Volume Name: volume1
    Type: Replicate
    Volume ID: 8c9e8e79-4a08-4810-98c0-7b5d44f38c6a
    Status: Stopped
    Number of Bricks: 1 x 2 = 2
    ##### snipped #####

    GlusterFS rejects snapshot restore while the target volume is still started.

  7. Restore the snapshot.
    $ sudo gluster snapshot restore snap-volume1-2025-01-10
    snapshot restore: success: Snap snap-volume1-2025-01-10 restored successfully

    The restore consumes the selected snapshot, so it will not remain available for another rollback.

  8. Start the volume.
    $ sudo gluster volume start volume1
    volume start: volume1: success
  9. Verify bricks report online after the restore.
    $ sudo gluster volume status volume1
    Status of volume: volume1
    Gluster process                             TCP Port  RDMA Port  Online  Pid
    ------------------------------------------------------------------------------
    Brick gfs1.example.net:/bricks/volume1       49152     0          Y       2412
    Brick gfs2.example.net:/bricks/volume1       49152     0          Y       2438
    Self-heal Daemon on gfs1.example.net         N/A       N/A        Y       2360
    Self-heal Daemon on gfs2.example.net         N/A       N/A        Y       2377
  10. Confirm the restored snapshot is no longer listed.
    $ sudo gluster snapshot list volume1
    snap-volume1-2025-01-17

    A restored snapshot disappearing from the list is expected GlusterFS behavior.

  11. Check expected restored data from a client mount.
    $ ls -l /mnt/glusterfs/recovery-marker.txt
    -rw-r--r-- 1 app app 36 Jan 10 12:04 /mnt/glusterfs/recovery-marker.txt

    Use a file, directory, or application smoke test that proves the volume is back at the selected snapshot point.
    Related: How to mount a GlusterFS volume in Linux