Linux command
btrfs-send 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Send a snapshot
btrfs send [/path/to/snapshot]
Send to a file
btrfs send [/path/to/snapshot] -f [backup.send]
Send incremental
btrfs send -p [/path/to/parent] [/path/to/snapshot]
Send with multiple clone sources
btrfs send -c [/path/to/clone1] -c [/path/to/clone2] [/path/to/snapshot]
Send and receive
btrfs send [/path/to/snapshot] | btrfs receive [/path/to/destination]
Send incremental over SSH
btrfs send -p [/snapshots/old] [/snapshots/new] | ssh [user@host] btrfs receive [/backup]
Quiet mode
btrfs send -q [/path/to/snapshot]
说明
btrfs send generates a stream of instructions representing a btrfs subvolume or snapshot. This stream can be received by btrfs receive to recreate the subvolume on another filesystem, enabling backup and replication workflows. The send operation works on read-only snapshots and produces a binary stream containing file data, metadata, and structural information. When a parent snapshot is specified, only the differences (incremental send) are transmitted, dramatically reducing transfer size for regular backups. The stream format is forward-compatible and can be piped directly, saved to a file, or transferred over network connections like SSH.
参数
- -f _file_
- Write stream to file instead of stdout.
- -p _parent_
- Parent subvolume for incremental send.
- -c _clone-src_
- Clone source (additional reference for deduplication).
- -v
- Verbose mode.
- -q
- Quiet mode (no progress).
- --no-data
- Send without file data (metadata only).
- -e
- End stream after subvolume data.
- --proto _N_
- Use send stream protocol version N.
FAQ
What is the btrfs-send command used for?
btrfs send generates a stream of instructions representing a btrfs subvolume or snapshot. This stream can be received by btrfs receive to recreate the subvolume on another filesystem, enabling backup and replication workflows. The send operation works on read-only snapshots and produces a binary stream containing file data, metadata, and structural information. When a parent snapshot is specified, only the differences (incremental send) are transmitted, dramatically reducing transfer size for regular backups. The stream format is forward-compatible and can be piped directly, saved to a file, or transferred over network connections like SSH.
How do I run a basic btrfs-send example?
Run `btrfs send [/path/to/snapshot]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f _file_ do in btrfs-send?
Write stream to file instead of stdout.