Johnny [Life & Code]

Semper Exploro!

CopyFS – Your personal file versioning system

with 2 comments

There were times when you edit code or a document and wish that you could go back to the previous version. Yep ! Thatz one of my serious issues. So I take cron’d back up diffs which is not so straight forward. Even when doing that you could miss some versions. Revision Control System (svn , cvs , bzr … ) may be the solution, but again you have to manually write / save it to the repository (commit). So i was little frustrated and planned to write my own simple versioning filesystem using FUSE.

Googling led me to CopyFS. Its a filesystem in userland using FUSE. I’m currently running OpenSuSE 10.2 and it took a few minutes to download and get it running.

Quoting from CopyFs HomePage :

CopyFS aims to solve a common problem : given a directory, especially one
full of configuration files, or other files that one can modify, and which
can affect the functionning of a system, or of programs, that may be important
to other users (or to the user himself), how to be sure that a person
modifying the files will do a backup of the working version first ?

This filesystem solves the problem by making the whole process transparent,
automatically keeping versionned copies of all the changes done to file under
its control.

It also allows a user to select an old version of the files, for example to
repair a mistake, and allows him/her to continue edition from this point.

CopyFS is distributed under the terms of the GNU GPL.

Project page :

Home Page :

There is a HowTo / Usage document on the CopyFS home page

There is a catch here . Currently When you save a file it maintains a full copy for each version. So diskspace will become a issue here. But I guess it’ll be fixed to maintain diffs ( deltas ) in which only the changes are saved and maintained.

Currently I dont have any data on performance. But I created test mount point and tried it out. So we have some storage data. Following are the data on-disk (copy-fs-storage-area) and copyfs (copy-fs-mounted )

jjohnny@trantor:~> du -h copy-fs-mounted/

jjohnny@trantor:~/copy-fs-mounted> ll
total 16
-rwxr-xr-x 1 root root 9504 2007-07-11 23:32 a.out
-rw-r–r– 1 root root 85 2007-07-11 23:33 main.c
-rw-r–r– 1 root root 0 2007-07-11 23:30 test.txt

jjohnny@trantor:~/copy-fs-mounted> copyfs-fversion main.c
File main.c (‘*’ is active) :
v1.0 : -rw-r–r– root root 43 Wed 11 Jul 2007 11:31:51 PM IST
v2.0 : -rw-r–r– root root 73 Wed 11 Jul 2007 11:32:15 PM IST
v3.0 : -rw-r–r– root root 85 Wed 11 Jul 2007 11:33:35 PM IST [*]

jjohnny@trantor:~> du -h copy-fs-storage-area/

jjohnny@trantor:~/copy-fs-storage-area> ls
00000001.4913 00000001..main.c.swp 00000002.4913 00000002.test.txt 00000003.test.txt metadata.4913 metadata..main.c.swp
00000001.a.out 00000001..main.c.swx 00000002.a.out 00000002.test.txt~ 00000004.4913 metadata.a.out metadata..main.c.swx
00000001..command-line.swp 00000001.test.txt 00000002..command-line.swp 00000002..test.txt.swp 00000004.a.out metadata..command-line.swp metadata.test.txt
00000001..command-line.swpx 00000001.test.txt~ 00000002.main.c 00000003.4913 00000004.test.txt metadata..command-line.swpx metadata.test.txt~
00000001.main.c 00000001..test.txt.swp 00000002.main.c~ 00000003.a.out dfl-meta.a.out metadata.main.c metadata..test.txt.swp
00000001.main.c~ 00000001..test.txt.swx 00000002..main.c.swp 00000003.main.c metadata. metadata.main.c~ metadata..test.txt.swx

Too many files !!. There is a modifed version of CopyFS available here :

Still no diffs. Sounds like a good project to contribute to .. 🙂


Written by Johnny

July 11, 2007 at 7:15 pm

Posted in Linux Fun, Programming, Tech

2 Responses

Subscribe to comments with RSS.

  1. Great discovery ! TNX a log, jony !


    July 16, 2007 at 7:06 pm

  2. s/log/lot/


    July 16, 2007 at 7:07 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: