Btrfs: Difference between revisions
imported>Onny Add section on transfer snapshot |
imported>Onny Add section on subvolumes |
||
| Line 85: | Line 85: | ||
== Usage == | == Usage == | ||
=== Subvolume === | |||
Create a subvolume | |||
<syntaxhighlight lang="bash"> | |||
btrfs subvolume create /mnt/nixos | |||
</syntaxhighlight> | |||
=== Snapshots === | === Snapshots === | ||
| Line 102: | Line 110: | ||
=== Transfer snapshot === | === Transfer snapshot === | ||
Sending the snapshot <code>/mnt/@nixos_snapshot_202302</code> compressed to a remote host via ssh at <code>root@192.168.178.110</code> and saving it to a subvolume mounted or directory at <code>/mnt/ | Sending the snapshot <code>/mnt/@nixos_snapshot_202302</code> compressed to a remote host via ssh at <code>root@192.168.178.110</code> and saving it to a subvolume mounted or directory at <code>/mnt/nixos</code> | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo btrfs send /mnt/@nixos_snapshot_202302 | zstd | ssh root@192.168.178.110 'zstd -d | btrfs receive ' | sudo btrfs send /mnt/@nixos_snapshot_202302 | zstd | ssh root@192.168.178.110 'zstd -d | btrfs receive /mnt/nixos' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category: Configuration]] | [[Category: Configuration]] | ||