Live data from Hacker News

Ask HN: I'd like an OS/FileSystem that Never Deletes Anything. Does it exist?

news.ycombinator.com

11–20 of 32 posts

Re: Ask HN: I'd like an OS/FileSystem that Never Deletes Anything. Does it exist?

#11

Look up "append only" filesystems. That'll get you most of the way there, but you'll have to manually reset things to get rid of old files. Or just use a competent backup system.

Let's say you are editing a source code file. You save and you run. Than you tweak, save and run again. But then you would like to go two changes in the past, but you did not make a commit. Very recent changes are not captured by backup systems, no matter how competent they are. I'd like to have all my files under git, for every save - and frictionless. I know it is a lot to ask.

This sounds a lot like what you're describing: https://github.com/tkellogg/dura

Re: Ask HN: I'd like an OS/FileSystem that Never Deletes Anything. Does it exist?

#13
> I'm tired creating backups, or loosing data. Let's be honest, sometimes it happens. Does a filesystem that never deletes/overwrites anything exist?

I use linux and system link the home folder to a Dropbox folder. There is an extended history option [1], so that you can go back a year for any file. I think it’s a reasonably close solution if you do not mind the cost and syncing to cloud.

[1]https://help.dropbox.com/files-folders/restore-delete/extend...

Re: Ask HN: I'd like an OS/FileSystem that Never Deletes Anything. Does it exist?

#15
On Windows, since 8.1, there is the built in File History. https://support.microsoft.com/en-us/windows/backup-and-resto...

On macOS, there is Time Machine built in. https://support.apple.com/en-us/HT201250

ZFS does have the concept of Snapshots but I would not consider that user friendly or useful for version tracking.

There is plenty of Version Control systems out there, like Git, again not user friendly for what you want.

Dropbox/OneDrive/Google Drive provide various levels of version tracking of changes.

I personally use Backblaze (30 days, continuous) and Tarsnap (45 days, nightly) for both off-site and temporal recovery when I really need it. Backblaze is used for "desktop" systems, Tarsnap for "server" systems.

Re: Ask HN: I'd like an OS/FileSystem that Never Deletes Anything. Does it exist?

#16
S3FS with versioning enabled on the S3 bucket would be a pretty low friction way to implement this. You'd also have to enable cross-region replication to deal with your "backups" being in the same place as your working copies.

OpenVMS also has a versioning filesystem and a NFS server. The x64 version is available as a private beta, but it's not cheap.

Personally, I just keep most stuff in a Google Drive folder and important stuff gets the keep versions forever bit turned on. Everything else goes in a git tree and have some automation to clone it to a reliable utility server when the OS thinks there's plenty of bandwidth available.

It's worth noting that the Google Drive solution is the only one that I've been able to get to work reliably across Linux, macOS, Windows, Android, and iOS. I've tried OneDrive, Dropbox, and iCloud Files, but they all have various problems with conflict resolution, annoying upselling, or limited file type support for versioning.

Re: Ask HN: I'd like an OS/FileSystem that Never Deletes Anything. Does it exist?

#17

Look up "append only" filesystems. That'll get you most of the way there, but you'll have to manually reset things to get rid of old files. Or just use a competent backup system.

Let's say you are editing a source code file. You save and you run. Than you tweak, save and run again. But then you would like to go two changes in the past, but you did not make a commit. Very recent changes are not captured by backup systems, no matter how competent they are. I'd like to have all my files under git, for every save - and frictionless. I know it is a lot to ask.

> Very recent changes are not captured by backup systems, no matter how competent they are.

Depends, there's backup software for Windows that will watch for file changes and backup immediately. Usually enterprise targetted. You could certainly do that on other OSes, possibly with less nice apis; a half measure would be taking filesystem snapshots continuously or once a minute or ???.

There's filesystems you can use on cd-r/dvd-r, although that doesn't sound pleasant, that would give you the option to go back to any version.

Re: Ask HN: I'd like an OS/FileSystem that Never Deletes Anything. Does it exist?

#18

Look up "append only" filesystems. That'll get you most of the way there, but you'll have to manually reset things to get rid of old files. Or just use a competent backup system.

Let's say you are editing a source code file. You save and you run. Than you tweak, save and run again. But then you would like to go two changes in the past, but you did not make a commit. Very recent changes are not captured by backup systems, no matter how competent they are. I'd like to have all my files under git, for every save - and frictionless. I know it is a lot to ask.

Look up "git wip", configure your editor to use it and it keeps an unintrusive 'second branch' in the background.

https://atom.io/packages/git-wip

"git-wip is a script that will manage Work In Progress (or WIP) branches. WIP branches are mostly throw away but identify points of development between commits. The intent is to tie this script into your editor so that each time you save your file, the git-wip script captures that state in git."

Re: Ask HN: I'd like an OS/FileSystem that Never Deletes Anything. Does it exist?

#19
Not exactly what you're asking for, but how about:

* use ZFS (or any snapshot capable file system)

* trigger snapshots at regular (short) intervals (as chosen by you).

ZFS snapshots are very low cost, and you can browse them using your normal file tools. You could reasonably snapshot every (say) 5 minutes, but I wouldn't try every second :)

Re: Ask HN: I'd like an OS/FileSystem that Never Deletes Anything. Does it exist?

#20

Look up "append only" filesystems. That'll get you most of the way there, but you'll have to manually reset things to get rid of old files. Or just use a competent backup system.

Let's say you are editing a source code file. You save and you run. Than you tweak, save and run again. But then you would like to go two changes in the past, but you did not make a commit. Very recent changes are not captured by backup systems, no matter how competent they are. I'd like to have all my files under git, for every save - and frictionless. I know it is a lot to ask.

I remember VMS on the VAX did this, it was a major pain in the neck, it was really easy to run out of disk space (although the quota on my account was 1 MB, which was somewhat small even in those days). But consider if this is really what you want. Every habitual save is another version. Every recompile duplicates all the intermediate object files. If you are using Unix and you have /tmp mounted on a versioned file system, every piped command like less or sort will create a new file. If your system uses pagefiles instead of a swap partition (e.g. macOS, Windows), that's going to be really unpleasant.

I've been developing for many years and I can't remember the last time I ran into this problem, so you can try my approach. When I'm debugging something and unsure of my solution, I comment out the original code and put the potential replacement below. If that doesn't work, do the same. I'll sometimes have three or four potential versions. Also, I generally commit every time a task is finished. During development the tasks might be pretty granular ("implemented underlines, strikethroughs, and custom fg/bg colors for text"), but each bug fix gets its own commit ("bug-2309: text was offset incorrectly on Win32"). Between these two, I rarely run into the problem.

Post reply on HN