Create a snapshot of the current state of Btrfs subvolume /data/current at /data/snap-before.
This is not a complete backup to another medium.
Which command is appropriate?
btrfs subvolume snapshot SOURCE DEST creates a copy-on-write snapshot of a subvolume. It does not protect against failure of the same storage.
Detailed explanation
btrfs subvolume snapshot /data/current /data/snap-beforeCorrect. The command creates the requested snapshot.
btrfs subvolume delete /data/currentIncorrect. This deletes the original subvolume.
mkfs.btrfs /data/currentIncorrect. mkfs.btrfs creates a filesystem on a block device.
btrfs filesystem show /data/currentIncorrect. filesystem show only displays Btrfs configuration.
Try it yourself
An example you can run in a temporary verification environment.
btrfs subvolume snapshot --help 2>&1 | sed -n '1,14p'Expected result
btrfs subvolume snapshot <source> <dest>の使用法Key points
- The source is a subvolume
- Snapshot uses copy-on-write
- It is not an independent backup
Notes
- Environment: btrfs-progs / ヘルプ表示のみ
- Prefer help or version output and a disposable device when testing storage commands.
- Formatting, repair, and mount changes can affect data or availability.
Foundation review
Place the operation
A snapshot is useful for short-lived recovery workflows but is not independent backup storage.
Check the side effect
Copy important snapshots to separate storage for protection from device failure.