7 ms·
Z3 – ZFS to S3 Backup/Restore Tool
- johnday 6y agoSlightly unfortunate name - z3 is the name of a widely-used theorem prover written at Microsoft.
- iou 6y agoYeah, feels wrong to add that ambiguity
- iou 6y agoI'll take the opportunity to plug Dennis Yurichev's Z3 book ;) https://sat-smt.codes/main.html https://sat-smt.codes/main.html
- snovv_crash 6y agoAn I was thinking for a moment about the album by The Devin Townsend Project
- cgearhart 6y agoClicked into the comments to say the same thing. I was just using Z3 today, actually–so that's what I thought this article would be about.
- scomp 6y agoYeah I got excited to see a thread about z3 then I realized.
- alert0 6y agoThey should just swap it to ZFS3.
- nikisweeting 6y agoNo that sounds like ZFS version 3.
- faeyanpiraat 6y ago3ZFS it is then
- alert0 6y ago3ZFS2S34ME
- Datagenerator 6y agoZFStoS3 would fit. Avoids the version number suggestion.
- account4mypc 6y agoi agree, but z3 is already heavily overloaded: https://en.wikipedia.org/wiki/Z3 https://en.wikipedia.org/wiki/Z3
- bcaa7f3a8bbc 6y agoAt least don't make it worse. Every time a new program uses the name "Z3", Konrad Zuse rolls in his grave. Using it for a single program shows homage and dedication, using it twice or more is excessive.
- faeyanpiraat 6y agoWhat does Z3 in itself even mean, so that so many people conclude it’s the righ name for their new project? You cannot even register most of the like 5 chars long domain names, who would think 2 chars will be unique?
- adamzegelin 6y agoGreat to see more tooling in the ZFS space, especially around send/receive. I'd like to see more around snapshot management too. Last release in 2016 though?
- brian_herman 6y agohttps://www.tarsnap.com/ https://www.tarsnap.com/ Is great for stuff like this he is I think the head of FreeBSD security hopefully he will also comment on this.
- denkmoon 6y agoSince we're sharing alternatives, I'll also link https://zfs.rent https://zfs.rent This was on HN front page a few months ago. I haven't managed to get a drive there yet (demand outstrips supply for now) but I really hope it takes off and thrives.
- chx 6y ago> demand outstrips supply for now care to elaborate? Their business model since the last update only allows for shipping drives to them, they no longer sell drives so I do not quite get what you mean here. That said, this is immensely cool thanks for the pointer.
- denkmoon 6y agoMy misunderstanding of their new pricing model :) I was just going off the store page which shows HDDs as out of stock.
- LogicX 6y agoSounds like https://www.delimiter.com/slot-hosting/ https://www.delimiter.com/slot-hosting/ which I’ve used in the past. Same cost per drive, but 4x the bandwidth included.
- kawsper 6y agoThere's also Rsync.net: https://www.rsync.net/products/zfsintro.html https://www.rsync.net/products/zfsintro.html
- barbazoo 6y ago> z3 is tested on python 2.7 Yikes!
- dhagberg 6y agoDon’t forget to calculate your egress network costs to download for restore. That could make the costs look a lot worse than other zfs backup services like rsync.net.
- unethical_ban 6y agoIf you're using Glacier, these are not "instant restore" backups, but "my house just burned down" backups. Glacier storage is $0.010 per gigabyte/month. rsync.net is $0.025 for the same. Glacier retrieval is $0.03 per gigabyte. So a one time emergency hit.
- ryan29 6y agoAs good as ZFS is, are people relying on ZFS replication for all of their redundancy and backups? Is that a good idea in terms of risk mitigation? When I set up backups for my home lab server, I opted to go with Borg + Borgmatic + BorgBase for backups. I already use Sanoid + Syncoid for local snapshots and replication, so I was hesitant to rely on ZFS replication for offsite backups too. Instead, I use Borgmatic hooks to link the most current Sanoid snapshot to a well known location, run my backups to BorgBase, and delete the link. I'm still relying on ZFS snapshots, but the backups, versioning, pruning, etc. are a completely different system than the local replication. I'm also not a fan of the full + incremental strategy for backups since I think it encourages long increment chains.
- ericbarrett 6y ago> Is that a good idea in terms of risk mitigation? It is definitely not. Snapshots + replication is a great 99.9% "hot data" backup, but they don't guard against administrative error or massive pwnage (think ransomware). At least three copies, at least two locations, at least two different systems (media/backup device vendors/operating systems/etc.) is the full package, so to speak. EDIT: I don't want to crap on this project as it serves a great use case. But any filesystem-based replication should be backed up by a logical copy, e.g. a tar or a zip file or just an "aws s3 cp -r". I have seen even checksummed file systems replicate data incorrectly due to bugs, unlucky bit-flips, ECC errors, CPUs literally taking the wrong branch. And remember, at the base of everything, this stuff is written in C!
- rjzzleep 6y agoIf the AWS IAM rules have no overwrite and delete permissions then both admin and ransomware aren't really an issue are they? Obviously putting all your buckets on AWS performing correctly is a potential risk by itself, but it's a different kind of risk.
- rakoo 6y agorsync.net allows you to send zfs send your own filesystem, and they have provisions to make the data append-only so you can't fall victim to ransomware. Of course it doesn't protect against bugs in zfs itself, so it's still good to use another software depending on how critical your data is but I'd say for a very large majority of cases it should be enough
- agurk 6y agoFor anyone who might be interested in doing this with fewer dependencies/tooling I have written a bash script that pushes ZFS snapshots to S3: https://github.com/agurk/zfs-to-aws https://github.com/agurk/zfs-to-aws I have it running in a cronjob on my NAS nightly, and a retention policy on aws to push it straight into glacier. There's no restore script as this is my last line of backups, so I thought if I was restoring from here I'd want to do it manually. I might get around to writing one now however.
- geek_at 6y agohow do you handle encryption? can you add it before storing it to AWS or do you trust your unencrypted data to amazon?
- agurk 6y agoNative (per-dataset) encryption. This has been a possibility since ZoL 0.8.0 [0] released two years ago. This means that the stream created by zfs send is seamlessly encrypted. I waited until this feature was released/stable before I started uploading to AWS. Practically you need to add the -w or --raw flag to zfs send to make it do this. [0] https://github.com/openzfs/zfs/releases/tag/zfs-0.8.0 https://github.com/openzfs/zfs/releases/tag/zfs-0.8.0
- nickik 6y agoBut if my dataset is not encrypted already (legacy dataset), it will not be encrypted?
- agurk 6y agoThat is correct, this script will not add any encryption. It would be trivial to add however by adding gpg into the send command pipeline: /sbin/zfs send --raw -cp $snapshot | pv -s $snapshot_size | aws s3 cp - <args> would become: /sbin/zfs send --raw -cp $snapshot | gpg --encrypt <args> | pv -s $snapshot_size | aws s3 cp - <args>
- 6y ago