All of lore.kernel.org
 help / color / mirror / Atom feed
* synchronize btrfs snapshots over a unreliable, slow connection
@ 2021-01-04 20:51  
  2021-01-05  8:34 ` Forza
  2021-01-07  1:59 ` Zygo Blaxell
  0 siblings, 2 replies; 11+ messages in thread
From:   @ 2021-01-04 20:51 UTC (permalink / raw)
  To: linux-btrfs

­I have a master NAS that makes one read only snapshot of my data per day. I want to transfer these snapshots to a slave NAS over a slow, unreliable internet connection. (it's a cheap provider). This rules out a "btrfs send -> ssh -> btrfs receive" construction, as that can't be resumed.

Therefore I want to use rsync to synchronize the snapshots on the master NAS to the slave NAS.

My thirst thought is something like this:
1) create a read-only snapshot on the master NAS:
btrfs subvolume snapshot -r /mnt/nas/storage /mnt/nas/storage_snapshots/storage-$(date +%Y_%m_%d-%H%m)
2) send that data to the slave NAS like this:
rsync --partial -var --compress --bwlimit=500KB -e "ssh -i ~/slave-nas.key" /mnt/nas/storage_snapshots/storage-$(date +%Y_%m_%d-%H%m) cedric@123.123.123.123/nas/storage
3) Restart rsync until all data is copied (by checking the error code of rsync, is it's 0 then all data has been transferred)
4) Create the read-only snapshot on the slave NAS with the same name as in step 1.

Does somebody already has a script that does this?
Is there a problem with this approach that I have not yet considered?­

---

Take your mailboxes with you. Free, fast and secure Mail & Cloud: https://www.eclipso.eu - Time to change!



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-01-11  9:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 20:51 synchronize btrfs snapshots over a unreliable, slow connection  
2021-01-05  8:34 ` Forza
2021-01-05 11:24   ` Graham Cobb
2021-01-05 11:53     ` Roman Mamedov
2021-01-05 12:24     ` Cerem Cem ASLAN
2021-01-06  8:18       ` Forza
2021-01-07  2:06         ` Zygo Blaxell
2021-01-11  9:32         ` Cerem Cem ASLAN
2021-01-07  3:09   ` Zygo Blaxell
2021-01-07 19:22     ` Graham Cobb
2021-01-07  1:59 ` Zygo Blaxell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.