From: Jim Salter <jim@jrs-s.net>
To: Hugo Mills <hugo@carfax.org.uk>, KC <impactoria@googlemail.com>,
linux-btrfs@vger.kernel.org
Subject: Re: Snapshots – noob questions
Date: Mon, 27 Jan 2014 09:14:09 -0500 [thread overview]
Message-ID: <52E669B1.1000401@jrs-s.net> (raw)
In-Reply-To: <20140127140350.GL3314@carfax.org.uk>
Well... you can't /create/ snapshots on different partitions / cloud
storage / whatever, but you can certainly /send/ them there once you've
created them.
Generally the best way to do this kind of thing is with incremental
replication of snapshots to another btrfs filesystem, which may be local
or cloud.
you@box1:~$ sudo btrfs send /.snapshots/snapshot1 | ssh you@box2
sudo btrfs receive /.snapshots
This sends the snapshot to the remote machine, where it will end up in
/.snapshots. This is a FULL send - you'll be sending a MB of data for
every MB stored on disk locally. But the next time:
you@box1:~$ sudo btrfs send -p /.snapshots/snapshot1
/.snapshots/snapshot2 | ssh you@box2 sudo btrfs receive /.snapshots
Assuming you still have a copy of snapshot1 on box2, the next time, you
can do an INCREMENTAL send as shown above. This tells btrfs send to use
snapshot1 as a "parent" - which means it only sends the blocks in
snapshot2 that are different from the blocks in snapshot1. For example,
this might be a filesystem with 500GB of data - but if you only changed
10MB of that data between snapshot1 and snapshot2, you only have to send
that 10MB of data to box2 with this incremental send.
Now you have snapshot1 and snapshot2 on both the local and the remote
machine - and, best part, they're deduplicated, meaning that even though
each snapshot is a fully browseable copy of your (example) 500GB of
data, they only require (example) 500.01GB of storage - the 500GB of
data they share in common, plus the 10MB of stuff that's different
between snapshot1 and snapshot2.
On 01/27/2014 09:03 AM, Hugo Mills wrote:
>> 5. Can a snapshot be stored on a different partition? And if so,
>> does that partition have to be BTRFS too? I ask, because I would
>> also want to store snapshots in a cloud storage.
> No, they can't.
next prev parent reply other threads:[~2014-01-27 14:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 13:53 Snapshots – noob questions KC
2014-01-27 14:03 ` Hugo Mills
2014-01-27 14:14 ` Jim Salter [this message]
2014-01-27 18:35 ` Chris Murphy
2014-01-27 18:42 ` Hugo Mills
2014-01-27 18:44 ` Chris Murphy
2014-01-27 18:50 ` Hugo Mills
2014-01-27 19:49 ` Chris Murphy
2014-01-28 18:39 ` Martin
2014-01-28 19:16 ` Hugo Mills
2014-01-29 1:21 ` Duncan
[not found] ` <52E808CB.9020005@gmail.com>
2014-01-28 20:16 ` Chris Murphy
[not found] ` <52EABE29.6080703@gmail.com>
2014-01-31 4:05 ` Chris Murphy
2014-01-31 4:19 ` Chris Murphy
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=52E669B1.1000401@jrs-s.net \
--to=jim@jrs-s.net \
--cc=hugo@carfax.org.uk \
--cc=impactoria@googlemail.com \
--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