{"id":106,"date":"2003-01-29T00:00:00","date_gmt":"2003-01-28T23:00:00","guid":{"rendered":"https:\/\/wwwneu.strehle.de\/tim\/weblog\/archives\/2003\/01\/29\/39\/"},"modified":"2003-01-29T00:00:00","modified_gmt":"2003-01-28T23:00:00","slug":"39","status":"publish","type":"post","link":"https:\/\/www.strehle.de\/tim\/weblog\/archives\/2003\/01\/29\/39\/","title":{"rendered":"Auto-versioning file system"},"content":{"rendered":"<p>This should be possible even without patching Samba:<\/p>\n<p>Let&#8217;s scan a directory (including subdirectories) for changes. The user must put files (not symbolic links) into this directory.<\/p>\n<p>Once a new file comes in, it is moved into another, invisible directory (make sure you don&#8217;t move it away while it&#8217;s still being written). RCS versioning is applied to the file, and a symbolic link is created in the original location. The user can now continue reading the file.<\/p>\n<p>When writing to the symbolic link through Samba, the link is being replaced by a file. We can detect this and check in a new RCS version and recreate the link. If the linked file is changed directly (through local access), we can detect this as well.<\/p>\n<p>Deleted files can also be detected, and we can move the RCS file into a trash directory.<\/p>\n<p>Moved files can be identified using a file size\/MD5 check sum index.<\/p>\n<p>An automatically created subdirectory (&#8222;Versions&#8220;?) contains .url files (or static HTML files?) for version management: Comments can be added to files and versions, you can restore or download a previous version (or even do a diff). And you can peek into the trash directory here to restore or erase some or all of the files it contains.<\/p>\n<p>All of this would work without a database. Probably only suited for single or a few users, and for not-too-frequent changes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This should be possible even without patching Samba: Let&#8217;s scan a directory (including subdirectories) for changes. The user must put files (not symbolic links) into this directory. Once a new file comes in, it is moved into another, invisible directory (make sure you don&#8217;t move it away while it&#8217;s still being written). RCS versioning is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_share_on_mastodon":"0"},"categories":[1],"tags":[],"class_list":["post-106","post","type-post","status-publish","format-standard","hentry","category-weblog"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/posts\/106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/comments?post=106"}],"version-history":[{"count":0,"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/posts\/106\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/media?parent=106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/categories?post=106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/tags?post=106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}