You are not logged in.
I want to use BTRFS for incremental backups using snapshots to save space by only writing the changes but it is confusing how to do it the right way. I made a BTRFS partition and made a sub-volume on a fresh disk. I am using rsync to send over /home/mags to the BTRFS partition
# mkfs.btrfs -L backups /dev/sdb1
# mount -o compress=lzo /dev/sdb1 /mnt/backup
# btrfs subvolume create /mnt/backup/first
# rsync -aP --exclude=.cache /home/mags /mnt/backup/first/When I am ready for the incremental part in a week, do I take a snapshot and just repeat?
# btrfs subvolume snapshot -r /mnt/backup/first "/mnt/backup/"
# rsync -aP --exclude=.cache /home/mags /mnt/backup/first/I will be left with /mnt/backup/first that holds the old data and /mnt/backup/first_2017-0516 that holds just the different parts right?
Last edited by maggie (2017-05-16 21:39:28)
Offline
It's the other way round.
/mnt/backup/first_2017-0516 will contain the old data and /mnt/backup/first will contain then newly synced data
Offline
I understand it now. Some guides I found say to run rsync with the --hard-links --inplace switches but I don't see why that is needed. Am I doing it right with just the -aP switch? http://www.sanitarium.net/golug/rsync+b … _2011.html
Offline
I think the guide you linked is pretty dated. I don't see why you would want either of those switches though. If btrfs is doing the snapshots linking them, I don't think it cares if rsync or cp or cat file > /path/to/backup writes the data. Correct me if I am mistaken.
Offline