I've set up a backup-server that creates daily BTRFS-snapshots of / in /backup/.
btrfs subvolume snapshot -r / /backup/$(date +%s) # simplified example
I found this to be problematic because the snapshots get bloated by temporary volumes in /var/lib/docker. Now I'd like to create snapshots of /home only. But this does not work:
# btrfs subvolume snapshot -r /home /backup/$(date +%s)
ERROR: Not a Btrfs subvolume: Invalid argument
So I understand I need to make /home a subvolume. I'm unsure whether this means /home must be mounted separately. I've looked at other questions like How to make a btrfs snapshot? but they already have /home set up for this. How can I migrate this? What are the steps I need to take?
My current devices:
# blkid
/dev/sda1: UUID="39520d46-2e30-4b51-b093-2a3671eb8f52" TYPE="swap" PARTUUID="c9b515af-26c9-4809-aee1-680ca5ee7153"
/dev/sda2: UUID="3a994a01-9d92-4e67-8440-284ce24465f8" UUID_SUB="cbb73892-5f50-40f2-b411-37307bcbefc4" TYPE="btrfs" PARTUUID="462e3ffe-2c99-4481-89aa-b3f13f3985dc"
/dev/sdb: UUID="3a994a01-9d92-4e67-8440-284ce24465f8" UUID_SUB="b78ffe6c-c078-4cc5-b4c7-dd3874251394" TYPE="btrfs"
/dev/sda3: PARTUUID="63c9d4dd-0a85-40d6-9e10-3eaffcba4b49"
The / volume is mirrored on /dev/sda2 and /dev/sdb.