2023-03-19 20:16:28 +01:00
|
|
|
# subprocess-util
|
2023-01-27 11:31:11 +01:00
|
|
|
|
2023-03-19 20:16:28 +01:00
|
|
|
## Example to replicate a BTRFS subvolume with an active sending side
|
2023-01-27 11:31:11 +01:00
|
|
|
|
2023-03-19 20:16:28 +01:00
|
|
|
The sending side "pushes" the BTRFS snapshot to the receiving side. The sender needs password-less SSH access to the receiver.
|
2023-01-27 11:31:11 +01:00
|
|
|
|
2023-03-19 20:16:28 +01:00
|
|
|
First, start the receiving side:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
sudo btrfs-receive-chunks-passive \
|
|
|
|
/target-snapshot-path/20230213T1809_u/
|
2023-01-27 11:31:11 +01:00
|
|
|
```
|
|
|
|
|
2023-03-19 20:16:28 +01:00
|
|
|
Then, start the sending side:
|
2023-01-27 11:31:11 +01:00
|
|
|
|
2023-03-19 20:16:28 +01:00
|
|
|
```shell
|
|
|
|
sudo btrfs-send-chunks-active \
|
|
|
|
/source-snapshot-path/20230213T1809_u/ \
|
|
|
|
ssh-hostname-of-receiving-side \
|
|
|
|
/target-snapshot-path/20230213T1809_u/
|
2023-01-27 11:31:11 +01:00
|
|
|
```
|
2023-03-19 20:16:28 +01:00
|
|
|
|
2023-03-29 18:00:22 +02:00
|
|
|
See [test16()](src/subprocess_util/test.py).
|
2023-03-19 20:16:28 +01:00
|
|
|
|
|
|
|
## Example to replicate a BTRFS subvolume with an active receiving side
|
|
|
|
|
|
|
|
The receiving side "pulls" the BTRFS snapshot from the sending side. The receiver needs password-less SSH access to the sender.
|
|
|
|
|
2023-03-29 18:00:22 +02:00
|
|
|
See [test17()](src/subprocess_util/test.py).
|