Re: Snapshots – noob questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux