Files
oam/knowledge base/snapper.md
2023-12-29 22:53:08 +01:00

1.5 KiB

Snapper

Table of contents

  1. TL;DR
  2. Further readings

TL;DR

# List existing configurations.
snapper list-config

# List existing snapshots.
snapper list

# Create a manual standalone snapshot.
snapper \
  --config 'root' \
  create --read-only \
    --type 'single' \
    --description 'manual checkpoint' \
    --userdata 'important=yes'
snapper create -t 'single' -d 'manual checkpoint' -c '' -u 'important=yes'

# Rollback to snapshot #0.
snapper rollback 0

# Delete one or more snapshots.
snapper delete 5
snapper delete --sync {7..9}

# Compare 2 snapshots.
snapper status 0..6
snapper diff 6..21

# Change values of an existing snapshot.
# the cleanup algorithm must be one of 'number', 'timeline', 'empty-pre-post' or
# '' (empty string, to cancel).
# Any description must be less than 25 characters.
# Any userdata must contain KEY=VALUE couples.
snapper modify \
  --userdata 'important=yes' \
  --description 'new description' \
  --cleanup-algorithm '' \
  12
snapper modify -u 'important=yes' -d 'new description' -c '' 12
snapper modify -c '' 2

Further readings