Hacker News new | past | comments | ask | show | jobs | submit login

A continuous snapshotting filesystem would be a more rigorous approach.



APFS is that, no? That’s how Time Machine works.


Kinda. It supports consistent snapshots but they are not easy to access or copy or ... except through TM. It ends up closer to VSS or LVM in usability, though it doesn't have to be since the architecture is better.

ZFS is likely the canonical example of a system that makes constant snapshots easy to use and access and deal with.

BTRFS is also not bad


Does ZFS snapshot every single operation you do? That sounds pretty cool. Unless you're saying snapshots are cheap but you have to create them manually, in that case it's not very useful against accidental deletion.


Not every operation. It's manual but easily automated. https://github.com/zfsonlinux/zfs-auto-snapshot


No, it doesn't snapshot every action. Even as cheap as they are, that would probably be overkill.

I have snapshots every 15 minutes, every hour, every day, every week (different retention schedules for each). And then anything dangerous there's a wrapper for "snapshot, do it, snapshot again".

It's really pretty difficult to lose anything this way, and recovery is _very_ easy. The snapshotted files are available in a magic directory named .zfs or something.

Backups are still needed of course, because if the fs shits itself (or enough redundant drives die), you'd still be in trouble.


I’ve still managed to do it, when I hit a poudriere bug which resulted in it doing a zfs destroy on my root partition, but yeah generally it’s hard to lose things on zfs.

What is it with OS manufacturers inventing clever file systems and then hiding all the features? APFS snapshots could be really useful to power users if the tooling was better. And NTFS was really modern for its time, but things like alternate streams were super hidden to the point nobody apart from malware authors used them.


> Does ZFS snapshot every single operation you do?

Snapshot-ing upon certain operations (e.g. file/s moved to a directory) is certain possible.

This blog post covers that pattern with my tool, httm: https://kimono-koans.github.io/inotifywait/


Sanoid is a great set-and-forget ZFS wrapper for snapshots. Also has syncoid to do offsite backups (ssh or usb hard disks)

https://github.com/jimsalterjrs/sanoid/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: