this post was submitted on 13 Sep 2024
3 points (100.0% liked)

btrfs

112 readers
1 users here now

founded 1 year ago
MODERATORS
 

Can I change the location of BTRFS snapshots. I installed CachyOS, and it automatically setup BTRFS subvols.

This is the layout ๐Ÿ‘‡

ID gen parent top level path
258 1773 5 5 @root
259 1601 5 5 @srv
260 1789 5 5 @cache
261 1785 5 5 @tmp
262 1797 5 5 @log
263 26 377 377 var/lib/portables
264 26 377 377 var/lib/machines
265 1791 377 377 .snapshots
266 1427 378 378 @home/.snapshots
377 1797 5 5 @
378 1797 5 5 @home

According to Arch wiki https://wiki.archlinux.org/title/Snapper#Creating_a_new_configuration

Create a subvolume at /path/to/subvolume/.snapshots where future snapshots for this configuration will be stored. A snapshot's path is /path/to/subvolume/.snapshots/#/snapshot, where # is the snapshot number.

From which I understand that if I created a snap of /home (@home), it will save in /home/.snapshots (@home/.snapshots).

So, CachyOS configured to save snaps to separate subvol.

But, what I want to do is, Instead of just saving it in separate subvol, i want snaps to be saved on different btrfs partition. Maybe @home/.snapshots but on different partition.

Is that possible ?

top 1 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 2 points 1 month ago

You must take snapshots on the same btrfs filesystem. You can btrfs send snapshots to another filesystem after the fact but they'll no longer be deltas, they'll include the full content that they reference. Setting up deltas across filesystems is complicated, do yourself a favor and use something like btrbk to simplify the process.