News for hackers. Stuff that matters.
Re:Rsync.net: ZFS Replication to the cloud is here and fast by KirinDave on Friday December 18, 2015 @01:16PM (#10759910)
This is awesome, but it should also remind us of something that is easy to forget. This is tangential to the thread, but relevant becuase of ZFS.

Note how they run ZFS, "FreeBSD."

We tend to ignore it shipping cloud services and mobile apps and websites, and just focus on Linux based deploys. But FreeBSD is out there. It has all the amenities you'd expect from a modern Linux and more including:

1. Compatibility with nearly all Linux binaries.

2. A more robust implementation of containerization (Jails), with a matching implementation of a docker API.

3. Proven OpenZFS support.

4. A really robust framework for moving and standing up software.

5. Proven performance.

In a way, tbh, it's like one of many tech stacks we've neglected for the "mainstream" even though it has a proven track record and great features. ZFS is also in that family, as is stuff like Mono and OCaml.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by PhantomGremlin on Friday December 18, 2015 @05:04PM (#10761307)
We tend to ignore it

One thing that FreeBSD doesn't have is a well known public face. Every software project (and company) needs one.

Linux is Torvalds. Of course there's a lot more to a distribution than the kernel, but most people don't think that far.

OpenBSD is Theo. Love him or hate him.

But FreeBSD? A while ago Jordan Hubbard came to mind. But he was never "the" guy, and he left a long time ago. I view it as being run now by a nameless, faceless cabal.

Anyway, that's just my opinion on one reason why we tend to ignore it.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by jlgaddis on Friday December 18, 2015 @02:26PM (#10760393)
ZFS is awesome. I never would have imagined I could ever get excited about a filesystem, but I did. If you've never used it, I encourage everyone to check it out. It's so completely "flexible" and you can do things that you never would've thought of.

A while back, my personal mail server ran on FreeBSD 9.x on bare metal. I wanted to rebuild the physical host but run everything in jails on a "clean" 10.x install instead. I created a new virtual machine on our ESXi cluster, booted it with an mfsbsd image, and prep'd the hard disks. Back on the server, I shut down all the services, took snapshots, and shipped them off to the VM using ZFS send/receive. In short order, I had P2V'd my mail server and it worked wonderfully. I left everything running in that VM for a few days while I rebuilt the physical server and got all of my jails set up and then moved it all back.

Allan Jude gave a cool talk at vBSDcon a few months ago entitled "Interesting Things You Didn't Know You Could Do With ZFS" [0]. If you've never used ZFS or you're wondering what it might have over your current filesystem of choice, you might check it out.

[0]: https://www.youtube.com/watch?v=qXOZmDoy2Co

Re:Rsync.net: ZFS Replication to the cloud is here and fast by rsync on Friday December 18, 2015 @12:15PM (#10759527)
Obligatory:

rsync.net has always had a "HN readers discount" which is quite substantial. Just email [email protected] and ask about it.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by coldpie on Friday December 18, 2015 @08:52AM (#10758369)
I loved reading this article because it's just pure nerd joy. The guy is so enthusiastic about rsync, measurement, and unix, just reading the article is fun, even if I don't have a use for this particular tool.
Re:Rsync.net: ZFS Replication to the cloud is here and fast by swiley on Friday December 18, 2015 @10:10AM (#10758819)
Just a note to anyone new to rsync and friends: Rsync is a really fast version of cp that also works over networks. Rsync does not go both ways /and/ handle file deletion (you have to choose one or the other), so it can't replace dropbox and syncthing for example.
Re:Rsync.net: ZFS Replication to the cloud is here and fast by LeoPanthera on Friday December 18, 2015 @11:08AM (#10759136)
If you do want something that goes both ways, unison is essentially a bidirectional rsync.
Re:Rsync.net: ZFS Replication to the cloud is here and fast by moviuro on Friday December 18, 2015 @11:27AM (#10759246)
An syncthing (http://syncthing.net) is a working unison :)

(See http://popho.be/#gift for some more details, search unison)

Re:Rsync.net: ZFS Replication to the cloud is here and fast by rsync on Friday December 18, 2015 @12:07PM (#10759476)
Also note - rsync.net has supported Unison since 2007, although these days we would recommend using attic or borg, which we now support.[1]

[1] As in, full, native support - not just using an sshfs mount...

Re:Rsync.net: ZFS Replication to the cloud is here and fast by LeoPanthera on Friday December 18, 2015 @02:07PM (#10760270)
Interesting. Both both and attic are new to me. What are the differences between them? They look very similar.

Edit: Never mind, I found a handy list of differences here: https://borgbackup.readthedocs.org/en/stable/#differences-be...

Re:Rsync.net: ZFS Replication to the cloud is here and fast by darklajid on Tuesday December 22, 2015 @06:22PM (#10781044)
Not sure if you'll get back to this thread, but .. is something like syncthing impossible to imagine for rsync.net?

I guess that's a 'daemon' vs. 'executed binary on the remote side', but I think that'd be awesome.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by cm3 on Friday December 18, 2015 @03:11PM (#10760652)
I tried and failed to make Unison use its fast comparison method (timestamp and size) but FreeFileSync works great for that and I can recommend it especially for interactive syncing of folders. http://www.freefilesync.org/
Re:Rsync.net: ZFS Replication to the cloud is here and fast by LeoPanthera on Friday December 18, 2015 @11:06AM (#10759123)
I'm an rsync.net customer, and I use ZFS locally, but I'm not using ZFS replication because I can't control in what order the files in the filesystem get backed up. (And I'm also unsure whether it's even possible interrupt a transfer and resume it later, if the underlying data has changed. rsync does this no problem.)

My filesystems are pretty massive, but my internet connection is pretty crappy. I currently am running a script I hacked together which rsyncs my files up to rsync.net in (roughly) file size order - smallest first, largest last. This way, changes to huge files don't spend hours/days backing up, and preventing the backup of smaller files.

I haven't yet found a better way to do this.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by tjfontaine on Friday December 18, 2015 @11:30AM (#10759261)
OpenZFS has resumable send and receive -- so even if they don't have it today, they could have it in the future.

http://blog.delphix.com/matt/2015/03/25/resumable-zfs-sendre...

https://www.illumos.org/issues/2605

Re:Rsync.net: ZFS Replication to the cloud is here and fast by rincebrain on Friday December 18, 2015 @12:14PM (#10759520)
OZFS has it, but ZoL doesn't (yet), so I'd guess they don't yet.

https://github.com/zfsonlinux/zfs/issues/3896

e: Ah, they run ZFS on FreeBSD, but I don't think FBSD has it yet either...

Re:Rsync.net: ZFS Replication to the cloud is here and fast by jlgaddis on Friday December 18, 2015 @01:46PM (#10760115)
It's not in FreeBSD yet (1Q or 2Q16, IIRC, for -current) but when it is, I assume rsync.net will definitely support it.
Re:Rsync.net: ZFS Replication to the cloud is here and fast by gaadd33 on Friday December 18, 2015 @11:11AM (#10759155)
Doesn't ZFS replication send a snapshot? So the underlying data changing doesn't have any impact on the snapshot's view of the world.
Re:Rsync.net: ZFS Replication to the cloud is here and fast by LeoPanthera on Friday December 18, 2015 @11:16AM (#10759192)
Yes, but after the data has changed, I don't want to waste time sending data in the snapshot that is no longer in the live data. I'd rather just carry on from where it is now. My current system does this just fine.
Re:Rsync.net: ZFS Replication to the cloud is here and fast by masklinn on Friday December 18, 2015 @11:31AM (#10759263)
So you add a large amount of data, you snapshot, you delete that data and at that point you send the snapshot but don't want to send the deleted data? Why not just re-snapshot and send the new snapshot instead of the old one?

> And I'm also unsure whether it's even possible interrupt a transfer and resume it later, if the underlying data has changed

There is no "underlying data has changed" in a snapshot, it's a revision of the filesystem. As for interrupting and resuming later, Delphix apparently has contributed a resumable zfs send/receive to OpenZFS, though I don't know if it's available in yours or rsync.net's distribution: http://blog.delphix.com/matt/2015/03/25/resumable-zfs-sendre...

As for the concerns of sending small files first, I don't think ZFS could even use that: I don't believe it's content-addressed, so if you send a set of blocks from snapshot 1, interrupt and send snapshot 2 instead the blocks common to both will still be re-sent, ZFS only knows the block commonality from snapshots and since snapshot 1 hasn't been pushed its contents can't be used for snapshot 2. Unless the resumable replication support uses content addressing but that doesn't seem to be the case.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by LeoPanthera on Friday December 18, 2015 @02:03PM (#10760240)
> Why not just re-snapshot and send the new snapshot instead of the old one?

Because then you have to start form scratch every time. The snapshots are so large that if you wanted to send a complete one, a large amount of stuff will have changed.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by nailer on Friday December 18, 2015 @02:42PM (#10760497)
Is 'rsync.net' actually Tridge [1], or just someone else trading on the name of an Open Source project? There's no 'about us' on the site to allow us to determine whether this is legit or not. And the stock photos look really sketchy.

[1] https://en.wikipedia.org/wiki/Andrew_Tridgell

Re:Rsync.net: ZFS Replication to the cloud is here and fast by rsync on Friday December 18, 2015 @09:15PM (#10762317)
rsync.net has nothing to do with the actual rsync project or its authors.

It may interest you to know that in 2006, when we were about to spin off rsync.net from JohnCompanies[1][2] we emailed all of the rsync authors and asked them if they had any objections at all to our naming the new company, and registering the domain name 'rsync.net' ... and they gave us their blessing.

As for the stock photos ... the old site had no photos at all. Baby steps ...

[1] The first VPS provider (circa 2001)

[2] Yes, really.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by PhantomGremlin on Friday December 18, 2015 @04:52PM (#10761227)
There's no 'about us' on the site

I tweaked them about this a few weeks ago, and got a detailed answer here on HN. But I guess they haven't gotten around to updating their site yet.

https://news.ycombinator.com/item?id=10674029

Re:Rsync.net: ZFS Replication to the cloud is here and fast by rsync on Friday December 18, 2015 @09:16PM (#10762322)
Sorry - getting to that ...
Re:Rsync.net: ZFS Replication to the cloud is here and fast by rmwaite on Friday December 18, 2015 @03:14PM (#10760663)
I remember looking into this site before and it appears they have rebranded. I know they used to be related to JohnCompanies [http://johncompanies.com] but I see no references to them anymore on rsync.net

It's possible they are no longer related.

edit: I just looked at http://johncompanies.com/about.html and they do still mention rsync.net on that page.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by antman on Friday December 18, 2015 @10:57AM (#10759066)
OK so how do we setup a fresh ubuntu all with zfs?
Re:Rsync.net: ZFS Replication to the cloud is here and fast by barkingcat on Friday December 18, 2015 @11:50AM (#10759379)
ZFS on linux is not an undertaking that can be easily explained in a hn commment. People have posted links to alternatives below.
Re:Rsync.net: ZFS Replication to the cloud is here and fast by jlgaddis on Friday December 18, 2015 @01:53PM (#10760170)
Someone will correct me if I'm wrong because I haven't used ZFS-on-Linux (my remaining Linux boxes are slowly being converted to all FreeBSD) but I don't think you can do "/ on ZFS" on Ubuntu since ZFS support is via a loadable kernel module (i.e., it's not in the mainline kernel -- and apparently never will be).

You can install on, e.g., ext4, and then create /home as ZFS and then take advantage of all that ZFS offers (such as sending full/incremental snapshots like this article talks about). Or you could put your databases on ZFS and use snapshots to back them up, and so on.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by aeorgnoieang on Friday December 18, 2015 @12:00PM (#10759449)
I don't remember the exact sequence of commands I entered to setup ZFS on several of my Ubuntu (14.04) boxes, but it certainly wasn't hard.
Re:Rsync.net: ZFS Replication to the cloud is here and fast by moviuro on Friday December 18, 2015 @11:29AM (#10759254)
You use FreeBSD + an hypervisor on top?

Or you try ZOL (ZFS on Linux): good luck!

Re:Rsync.net: ZFS Replication to the cloud is here and fast by brunoqc on Friday December 18, 2015 @11:34AM (#10759284)
https://wiki.ubuntu.com/Kernel/Reference/ZFS

I'm not sure if it's usable now and if it will be good with 16.04.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by rincebrain on Friday December 18, 2015 @12:20PM (#10759551)
I've been extremely astonished with how stable ZFS on Linux has been for me - I remember when it was unusable.
Re:Rsync.net: ZFS Replication to the cloud is here and fast by ClashTheBunny on Friday December 18, 2015 @10:58AM (#10759074)
Combine this with https://github.com/jollyjinx/ZFS-TimeMachine and you are in a much better place than Apple's terrible network Time Machine. It's cross-platform (except Windows) and it's much more reliable than SMB or AppleTalk.
Re:Rsync.net: ZFS Replication to the cloud is here and fast by rsync on Friday December 18, 2015 @12:12PM (#10759505)
Just a note ...

ALL rsync.net accounts run on a ZFS infrastructure.

The 1TB+ accounts that you can send/recv to do not have snapshots enabled, since it's your zpool and you can set up whatever snapshots you want.

But, our normal accounts[1] that you cannot ZFS send/recv to do have ZFS snapshots set up that we create and maintain for you, and they are immutable[2].

So this means you can just do a plain old 1:1 rsync mirror to your rsync.net account, forget all about incrementals or versions, and we will do whatever snapshot schedule you like.[3]

So it's just like time machine, but more efficient (block level vs. hard links) and you don't have to set it up or worry about it and an attacker that gets your rsync.net credentials cannot wipe out your historical backups, since they are immutable here.

[1] As always, HN-readers discount - just email [email protected]

[2] even for our local root ...

[3] default, for free, is 7 daily, or 7 daily + 4 weekly for TB+ customers, but you can set up any schedule you want (21 days, 8 weeks, 6 months, etc.)

Re:Rsync.net: ZFS Replication to the cloud is here and fast by tekacs on Friday December 18, 2015 @01:59PM (#10760211)
Any comment on why normal accounts can't ZFS send/recv?

Is it because there isn't one filesystem per customer? Is that something that could be done, feasibly? Would be curious to hear. :)

Re:Rsync.net: ZFS Replication to the cloud is here and fast by rincebrain on Friday December 18, 2015 @12:19PM (#10759544)
How do you enforce immutable snapshots for local root?
Re:Rsync.net: ZFS Replication to the cloud is here and fast by matt2000 on Friday December 18, 2015 @09:12AM (#10758487)
Really fun to read article, but could someone give me a couple examples of what kind of system you'd use this with? I guess I'm so used to S3 now that I've forgotten what it's like to manage your own files.
Re:Rsync.net: ZFS Replication to the cloud is here and fast by seiji on Friday December 18, 2015 @09:23AM (#10758551)
ZFS supports (and excels at) two necessary things for a good file system: copy on write snapshots and filesystem serialization. ZFS is designed to run one filesystem per user, so ZFS is designed to scale crazy high with little management overhead. It also makes it easy for snapshots to equal isolated per-user or even per-appication backups.

You can do neat things like: create a base filesystem, create a snapshot of it (i.e. "freeze" the filesystem in time), send the snapshot to another system (or over the network for S3 storage, etc), continue modifying files, create another snapshot on top of your first one, now you can send/backup the new snapshot which is only a diff of the original snapshot.

Many other systems besides ZFS support snapshots/copy-on-write layers, but they are mostly hacks and your performance will drop considerably during the "snapshot existing" time. ZFS is different because the snapshot mechanism doesn't kill your performance (unlike the 18 layer Linux file system organization).

"Sending" a snapshot can either be directly over the network to another system to ingest the snapshot (enabling you to stream a new filesystem/snapshot into existence on a remote machine), or you can gzip the snapshot stream and send it off to backup storage.

You can layer your snapshot diffs as much as you like. As long as you have all the diffs back to the original file system, you can re-create any point-in-time snapshot layer from your backup archive.

Longer details with examples are all over, but a good overview point is: https://docs.oracle.com/cd/E18752_01/html/819-5461/gbchx.htm...

Also, it's basically the only sane way to run containers in production since all the copy-on-write and snapshot sending isn't an 8 layer deep hack cake. In Solaris, containers are aware of filesystems at the deepest levels and the networking is aware of containers too. All Linux-based container fads over the past 5 years still haven't caught up to Solaris+ZFS+Zones+Crossbow from 6 to 10 years ago.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by jlgaddis on Friday December 18, 2015 @02:11PM (#10760297)
I work for an ISP and wear a bunch of different hats but one of them is my "mail server admin hat". I hated our (when I started) Windows-based piece of crap "solution" we were using and have been migrating all of our users and domains to a "proper" Postfix+Dovecot on FreeBSD mail system.

All hosted e-mail lives under /var/vmail on its own ZFS dataset ("filesystem"). I snapshot this dataset (via cron) several times per hour and ship those snapshots off to another machine in a different datacenter for safekeeping. If anything tragic were to happen to the mail server itself, I've got a pristine copy of all my users' mailboxes I can turn to that will be, at most, roughly 15 minutes out of date.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by barkingcat on Friday December 18, 2015 @10:35AM (#10758951)
This type of ZFS replication / synchronization and rsync as well isn't at all similar to S3. As seiji posted, this is a fast diff'ing mechanism - identifying and trasmitting only what changed from one version of a file to the next, excelling at when files are system images or very large multi-gig or multi-terabyte files.

With S3, I don't believe it has any ability to diff and/or store and transmit diffs - S3 is just a data store.

ZFS replication / rsync is more for the use case where you want to make sure files on multiple sides of the data transfer equation are the same, and can pass diffs back and forth between them.

Basically, if you need and only use S3 and file storage, this isn't want you want at all. The closest analogue is a binary git merge for very very very large files.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by takeda on Friday December 18, 2015 @01:39PM (#10760063)
Well if you use aws s3 sync, then know that this in fact relies only on timestamp and file size to compare files. If there's a difference it'll send the whole thing.

rsync is smarter it actually can compare and send parts of modified files. This article talks about new functionality which utilizes zfs snapshots. Now zfs knows better what has changed (for example whether file was renamed or moved) so it can be even faster when replicating the changes.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by brunoqc on Friday December 18, 2015 @11:01AM (#10759090)
Is the data encrypted?
Re:Rsync.net: ZFS Replication to the cloud is here and fast by rsync on Friday December 18, 2015 @12:14PM (#10759521)
rsync.net gives you an empty unix filesystem to do what you like with.

Since it runs over SSH (and since we deprecated webdav years ago) it is certainly encrypted over the wire.

If you would like it encrypted at rest, on our side, you should use attic or borg. borg appears to be the most popular:

http://www.stavros.io/posts/holy-grail-backups/

We just enabled our support for attic and borg and are very excited about it.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by jlgaddis on Friday December 18, 2015 @02:06PM (#10760263)
It's not the same, obviously, but one thing you could do is redirect "zfs snapshot" to a file (instead of passing it to "|zfs send"), encrypt that locally (using whatever means you prefer: openssl, gpg, etc.) and then upload that.

Of course, tarsnap pretty much does that all by itself and does it quite well.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by barkingcat on Friday December 18, 2015 @11:48AM (#10759369)
I don't think this is what you need. This is a base file diff and transfer system - you have to add encryption on top of it yourself.

Or you use a different tool like tarsnap that can be built on top of this.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by LeoPanthera on Friday December 18, 2015 @11:05AM (#10759113)
It runs over SSH, so yes.
Re:Rsync.net: ZFS Replication to the cloud is here and fast by brunoqc on Friday December 18, 2015 @11:12AM (#10759159)
What about on the server side? For the storage.
Re:Rsync.net: ZFS Replication to the cloud is here and fast by M4v3R on Friday December 18, 2015 @11:23AM (#10759223)
If you want server-side encryption, then Tarsnap is probably better for you.
Re:Rsync.net: ZFS Replication to the cloud is here and fast by brunoqc on Friday December 18, 2015 @11:35AM (#10759292)
Yes I use Tarsnap but an encrypted backup using file system snapshots would be the best thing ever.
Re:Rsync.net: ZFS Replication to the cloud is here and fast by barkingcat on Friday December 18, 2015 @12:02PM (#10759456)
One way that you can do this is just to zfs replicate a volume to another system that has an encrypted zfs mount. Probably not what you are looking for, but voila - end to end snapshotted encryption - except it's not a "backup", more like a hot failover volume.
Re:Rsync.net: ZFS Replication to the cloud is here and fast by rlpb on Saturday December 19, 2015 @10:43AM (#10763834)
So just take a ZFS snapshot and give Tarsnap the snapshot to back it up?
Re:Rsync.net: ZFS Replication to the cloud is here and fast by gjem97 on Friday December 18, 2015 @10:28AM (#10758908)
What other cloud providers do people use that support ZFS? Is ZFS on Linux a viable option these days?
Re:Rsync.net: ZFS Replication to the cloud is here and fast by benjohnson on Friday December 18, 2015 @11:02AM (#10759095)
Hetzner.de works fine for my needs - they have a ~220 Euro storage server with 10 x 6TB drives that you can install FreeBSD 10.2 on.

With ZFS you can have about 35TG usable (ZFS filesystems degrade in speed at 80% in my experience)

My cost is $.007 USD per GB.

Re:Rsync.net: ZFS Replication to the cloud is here and fast by toomuchtodo on Friday December 18, 2015 @12:00PM (#10759446)
You may want to look into Backblaze's new storage offering B2. It's $0.005 USD/GB.

https://www.backblaze.com/b2/cloud-storage-pricing.html