5 ms·
Actually,Time machine is not and has never been based on zfs. It is implemented using hfs+, journaling, and a kernel/fs modification for journaling and hard lin
by Locke1689 17y ago
Actually,Time machine is not and has never been based on zfs. It is implemented using hfs+, journaling, and a kernel/fs modification for journaling and hard links. A time machine snapshot is basically modified hard link journals.
- rbanffy 17y agoThe sad part is that Time Machine would be a one-liner had OSX supported ZFS since Leopard...
- glhaynes 17y agoWhich one line (heck, doesn't have to just be one) command would you issue to get Time Machine-like functionality from ZFS? ZFS contains a lot of features that sound like they overlap with Time Machine, but in practice they really don't in a way that would make Time Machine a "free" feature.
- furyg3 17y agoI implemented a simple personal backup solution a long time ago which is (essentially) what Time Machine implements now (without the eye-candy application, of course). It's not that hard, it only requires hard-linking, which the OS X kernel didn't support, so they added it. Steps: First run: * Rsync data from source drive to backup drive (can be done over network, ssh, whatever). We'll call this backup "0" Second run: * On the backup drive, copy the last backup folder (backup "0") to a new backup folder (backup "1"), using hardlinks. Hardlink copies don't take any additional space, since they're pointing to the original resource on the disk (folders do add some negligible space). * Rsync data from source drive to backup drive (backup "1"). Rsync, of course, only updates what's new/changed. Repeat, saving as far back as you'd like, and deleting old backups if the drive is full, after N backups, or so many days. Now you've got an easy incremental backup bash script. Hardlinks are beautiful, because they don't add extra space, and once all the hardlinks to a resource are deleted the resource becomes free space. This isn't an enterprise-level backup solution, but it's a great quick-and-dirty way to do incremental backups, and is exactly how Time Machine works.
- vsync 17y agorsnapshot works exactly that way as well and is a supported package.
- glhaynes 17y agoOne way this isn't exactly like Time Machine: since it doesn't hook into the FSEvents journal of file system modifications, rsync has to check the modified dates of every file in the backup set. With FSEvents, Time Machine knows what's changed (or at least which folders contain changed items) and can deal with only those. But, yeah, same basic concept for sure.
- rbanffy 17y agoThe gain I was referring to would be the use of ZFS snapshots instead of the convoluted and costly link-based mechanism Time Machine uses on HFS+ file systems. Obviously the rest of Time Machine would not fit in one line, but allow me the right to exaggerate a bit. I bet the timeline feature in Nautilus on OpenSolaris, while not a one-liner, must be quite simple an add-on.
- glhaynes 17y agoBut that's exactly what I mean: ZFS snapshots make copy-on-write branches of a single volume. Time Machine backs up files to an external disk. Unless there's some proposal to make Time Machine-managed external volumes be part of a pool that's only attached some of the time and thus get some ZFS benefit from that, I don't see how TM would be any different in a ZFS world. Now, local snapshots would be useful for sure (and could be integrated into the TM system in various ways), but they're totally orthogonal to separate-disk backup/versioning systems like TM.
- rbanffy 17y agoIt would not be just different - it would be much better. With ZFS, Time Machine would not require an extra disk and could maintain nearly continuous history of the whole file system even in single disk configurations. The minimum time between snapshots could be easily adjusted so that not much disk space is consumed in the process.
- glhaynes 17y agoIt would be different. To say it would be "much better" ignores that one of the primary usages of Time Machine is that it provides easy whole-disk backup in case of catastrophe. In this scenario (the primary reason why many people use it), ZFS is completely irrelevant. Now, perhaps one could imagine a future version of Time Machine that would read from source file system snapshots while making backups to the external target in order to capture versions that were made while the user was unplugged from the external disk; and perhaps ZFS would be appropriate for Time Machine target disks in order to save space via block copy-on-write. I'd say I expect both of these features at SOME point in the future ("expect" inasmuch as they're obvious wins and one has to think that the future direction of file systems is to include constant time low cost snapshots via copy-on-write), though I don't know if the file system(s) will actually be ZFS-derived or not. But this is a far cry from saying that Time Machine functionality would be free on top of ZFS. Any future version of Time Machine will include replication to an external disk (or, at least, "the Cloud") and that's NOT a feature of ZFS as it stands right now.