Jaster Posted April 11, 2021 Share Posted April 11, 2021 Hi, is it possible to work with BTRFS snapshots across two server? I'm running a cache on one server and would like to create snapshot backups (+ deltas) on the other one. Quote Link to comment
JorgeB Posted April 11, 2021 Share Posted April 11, 2021 Yes, you can use btrfs send/receive over ssh, that's how I backup all my servers. Quote Link to comment
Jaster Posted April 11, 2021 Author Share Posted April 11, 2021 Could you elaborate a little bit or send me a resource to read up please? Quote Link to comment
JorgeB Posted April 11, 2021 Share Posted April 11, 2021 There's some info here on how btrfs snapshots and send/receive work, difference is there it's sending locally, to send changes to another server you'd use for example: btrfs send -p /mnt/data/old_snaphot /mnt/data/new_snaphot | ssh root@ip "btrfs receive /mnt/backups" There's no GUI support, so you have to use the console or a script. Quote Link to comment
Jaster Posted April 11, 2021 Author Share Posted April 11, 2021 I don't mind scripting but I still need a full snapshot on the source server? Quote Link to comment
JorgeB Posted April 11, 2021 Share Posted April 11, 2021 1 minute ago, Jaster said: but I still need a full snapshot on the source server? Initial snapshot need to be sent in full to the dest server: btrfs send /mnt/data/1st_snaphot | ssh root@ip "btrfs receive /mnt/backups" After that you send only the changes: btrfs send -p /mnt/data/1st_snaphot /mnt/data/2nd_snaphot | ssh root@ip "btrfs receive /mnt/backups" and so on. Quote Link to comment
Jaster Posted April 11, 2021 Author Share Posted April 11, 2021 so on the first server I have the data, the initial snapshot and one delta? or can I get rid/avoid the initial duplicate/snapshot on the source server? Quote Link to comment
JorgeB Posted April 12, 2021 Share Posted April 12, 2021 18 hours ago, Jaster said: so on the first server I have the data, the initial snapshot and one delta? Yep. 18 hours ago, Jaster said: or can I get rid/avoid the initial duplicate/snapshot on the source server? No, but before you change that data that it refers to snapshots don't take any space. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.