From: " " <Cedric.dewijs@eclipso.eu>
To: <linux-btrfs@vger.kernel.org>
Subject: synchronize btrfs snapshots over a unreliable, slow connection
Date: Mon, 04 Jan 2021 21:51:46 +0100 [thread overview]
Message-ID: <dc1e528567c9a57d089d77824f071af8@mail.eclipso.de> (raw)
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!
next reply other threads:[~2021-01-04 20:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-04 20:51 [this message]
2021-01-05 8:34 ` synchronize btrfs snapshots over a unreliable, slow connection 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dc1e528567c9a57d089d77824f071af8@mail.eclipso.de \
--to=cedric.dewijs@eclipso.eu \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox