Home Directory In CVS
shamir_k writes "Joey Hess has come up with an innovative solution to a problem we have all faced. He's put his whole home directory in CVS. Not only can he move between multiple computers easily, he also has automatic distributed backups."
WTF, can he travel back to previous versions also?
How does that work?
oh, i, get, it,
This is innovative but not new, the LJ article is dated September 2002.
Waky, waky editors?
Don't forget the -kb switch when you do "cvs add pr0n.avi", otherwise you'll be disappointed when check the file out again.
"A door is what a dog is perpetually on the wrong side of" - Ogden Nash
Great, let's go hack it now! :)
Sorry to break you, but I was doing it (albeit on a smaller scale) for years ;-P Good reading though.
My other Beowulf cluster is... er...
Innovative? I don't think so. I would imagine that many people who are familiar with CVS are doing this.
What's next? Keeping system configuration in CVS?
Man, I have a hard enough time trying to get them to accept my insurance card for prescriptions. Hats off to him for getting them to take his files...
I have no sig, the eyebrows seal the deal. That's right. Eyebrows.
/etc
Have a checkin comment for why a configuration change got made. Be able to roll back a failed experiment reliably. Find out when a change happened.
ibid.
Anonymous Kev
Proudly posting as AC since 1997
Has anyone tried this with BitKeeper?
SCREW THE ADS! http://adblock.mozdev.org/ Proud user of teh Fox of Fire - Registered Linux User #289618
I asked this on a local linux mailing group recently- what do people think about the idea of a version control file system? Disk space is cheap these days, we can afford it space wise. Think of all the problems it would solve.
*Made a mistake in your config file? Revert it
*User deleted the file? Revert it
*Want to see why you made a change to any given file? Check the comments (commenting would be optional, of course)
*Your system was exploited? Revert the entire system to before the exploit
*Upgraded an app and regret it? Revert the files
And so on. I'm not sure if CVS would be the best method (I'm not a SCM specialist), but I'd see this as an extremely useful feature who's time has come.
I still have more fans than freaks. WTF is wrong with you people?
Posted on Sunday, September 01, 2002 by Joey Hess
It is a great article, don't get me wrong... it is just a little over a year old.... news ?
I hate CVS, and I have my Debian home directory on Subversion without data loss or another problem.
I put RCS subdirs all over, check files in and out.
It also makes complete OS upgrades easier, I use the RCS subdirs to tell what I changed from the base install.
Infuriate left and right
... quick, patent it!
Who has been checking in these skanky whores to ~/porn ?
I've been doing this for almost two years on NT. Keep a roaming profile on a DFS root. I keep a backend server separate so I always have a replicated backup. It also keeps replicated with other sites (work and the other office). Sigh.
funny munging
I guess he forgot to put his website on CVS
I'll put my home directory on Sourceforge! Everyone can now help me maintain it!
Doh!
You missed a comma by the way. Ironic in an Alanys Morisette way perchance?
'cause CVS loses the history in these operations.
I wonder why CVS, and not something more advanced, like Arch or Subversion? Especially since he outright complains about common limitations in CVS, like moving files and dealing with directories at all. If he's hoping, as he says, "for a better replacement some day", why not see what the present has to offer?
I mean, that's not to say that alternative systems are perfect, either. I'm going through the process of learning arch now. There's a learning curve, but not nearly as big as it's made out to be. Still, using something else (almost anything else) would probably help on things like the merging issues, especially since he mentions that sometimes it's a pain keeping things in sync between three of his machines.
Isn't this the sort of plug-in thing that Reiserfs is supposed to make a lot easier to do at a fundamental level ?
As I understand it, you register callbacks on the atomic operations of the FS, and your code gets run with appropriate parameters before/after whatever. A bit like SQL triggers...
Simon.
Physicists get Hadrons!
While this is a cool idea, it's not even remotely innovative. Can we please put up some kind of first year Unix user filter for story submissions?
Plan9 has the mantra : "file creation is forever"
/sys/src/libc/port/*.c
Automated incremental backups are a way of life.
With Venti one can even back up two windows/linux machines and *not* use up disk space for commonly used blocks, so backing up 100 machines wont use up the usual 1Gb each for the duplicate libs/windows directories.
The yesterday command give you the power to browse back through your life
Find what has changed in the C library since March 1:
yesterday -d -0301
When did you say this guy did the innovation again?
There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
And how the hell is this newsworthy? it's not...slashdot has once again gone a little further downhill in the quality of their news; this time so that we'll look at their new pretty banners and earn them double the cash every time we look at an article. now that slashdot is obviously heading in the commercial direction maybe someone ought to consider putting together a new geek news site?
What's the point of saturation?
Obligatory link to Subversion, since this new-fangled hypertext media allows it.
(With a hint of sarcasm for you mentioning it but not linking!)
From personal experience it seems to be quite usable already. Although I did find it hard to install and get everything set up properly (path problems, etc) partly because I'm a Visual SourceSafe refugee. I'm still not quite used to the pathing schemes and checkin model and am still confused by wanting to assign a VSS-style 'working directory' to a Subversion folder and not knowing what to do about that.
That's a smart way of doing things. I've found version control to be worthwhile on even single user projects. Having the same kind of backup/restore and history tracking on every one of your files just makes sense. I'm suprised no-one has done this sooner.
In a slightly more abstract sense, it provides a 'working set' of documents on your computer. Comments on your version history adds meta-data to files that is time-based. Most systems at the moment add meta-data that is for the current file. Imagine, you check in some files with a comment like 'Project: holiday snaps 03'. Then later on, you use one of those files in a presentation 'Project: report for Bill 03'. With standardised formatting of such tags, the file keeps with it the idea that it has been used with multiple projects at different times. That's a powerful method of grouping.
Ever been in the situation where a file belongs with multiple projects? With your standard directory structures, you might put it in one directory and shortcut/alias/whatever it in the other (or maybe make a second copy). It's pretty ugly right? What if you could say, this file belongs to both of these projects, and you could even provide the old version that was used in another project. OK, so all of that would require some more automation - we can dream can't we?
That has a lot of possibilities.
Refuse to make a statement in your sig!
I'm a conservative guy when it comes to my computing environment (I've used the same wallpaper image for the past five years)
Pff, big deal, I've used the same toilet paper for 5 years! How about that for conservative?
somehow I don't like the idea of my private ssh keys being sown like a seed across a number of systems.
To much of a headace worrying about where they are, were they deleted properly... etc.
... until you needed to recover something
Something like this that ran in the background would be great. Anytime you created a file/dir, it would do so in CVS, just as when you re-save a file, it automatically versions it. And for GUI-using weenies like me, a right-click should give me a "View file history" option.
Information: "I want to be anthropomorphized"
you will have backups. this as innovative as saying: Make backups of your system.
I have CVS repositories in my home dir .. would those get versioned too? *head warps into the fourth dimension*.
"Hey bob! Can we roll back the CVS repository to yesterday's version so I can re-commit a better version of my code?"
I currently store parts of my .thunderbird and .phoenix directories in CVS and do the commit/update to sync work and home. In general it works pretty well, though not all my settings translate well between OS X (work) and Red Hat (home). For this reason in particular, extensions are not in my CVS and this makes keeping stuff custumized a bit of a pain still.
"When ideology and theology couple, their offspring are not always bad but they are always blind." -- Bill Moyers
"Hold on a minute, I've got to check out this porn."
I don't have a sig...Do you??
What is the problem we have all faced? And what is CVS?
SCO$699/$1499FeeTroll posts are always successful first posts. Don't tarnish the image you cock-smoking teabagger.
ok .. this isn't innovative .. this is stupid .. .. now you have to deal with the added
.. it simply further
why not just run backups on your homedir and
export it?
headache delays of checkin and checkout
but seeing this post is good
illustrates the incompetence of the slashdot
crew
My recommendation: use the Unison file synchronizer to keep multiple copies of your home directory in sync.
It's not quite the same thing as CVS, but that's probably a good thing. Most importantly, it won't give you versioning. On the other hand, it is symmetric (meaning, none of the copies are distinguished) and it is much less hassle to use. Also, you can define custom merge methods to automate merging of things like mailboxes. Unison is great for keeping a home directory (or portions of it) in sync between different desktops, and between desktops and laptops.
Note that for live backups, rsync is probably still the best choice because you want something unidirectional.
How is it you can post mostly thoughtful comments to "the other site" (or more accurately, the site for which this site is "the other site") and yet turn into a drivel spouting troll here?
I remember reading this article over a year ago when it came out. CVS is nice, but it doesn't handle directories well. IIRC, he mentions this.
I've recently started using rsync kinds of scripts along with cron. It doesn't keep history, but it makes syncing really easy. If you need history, make daily backups. Additionally, rsync is slightly better at lower bandwidth usage vs full blown CVS.
As for ssh keys (as someone here mentioned) you can have CVS and rsync ignore specific directories you don't want copied.
Pay up, cock-smoker.
How would this work for my > 1Gb VMWare virtual disks? I don't think it would very well.
Seeing how its CVS not CSV, shouldn't you say "he should have chosen XSL?"
but you didn't fool me. I'm not quite that senile to have forgotten that Home Directory on CSV had a pointer stored away in my failing memory system. When I checked I found it pointed to the Linux Journal article where it was published a year ago.
Better luck next time!!
Well, instead of showing everyone your ignorance, look it up. Obviously you are not a developer, or interested OSS or you would be ashamed.
And, as a side note, it IS brilliant.
ymmv
Salvage is your friend. Of course they may have change it's name or removed it, it was salvage back in 4.1.
Easy, just include the CVS repo under your home directory and commit it.
CVS:sing almost everything is an old idea (as many people are already mentioned). What I'm looking for is filesystem with integrated version control. This also mean that you never lose any data you have once saved. With 200 GB size hard disks (and rising) you probably don't run out of disk space quickly.
Personally I prefer Aegis. It's a bit more complicated to use than CVS (well, aegis is MUCH easier to install than subversion), but takes care about way more situations for you.
Less is more !
I actually understood every single word of that article.
/home tomorrow. It's brilliant. cvr -q add c:\home c:\home\*.*.
I'm going to check-in my
Ceci n'est pas une signature
I shudder to think what happens when he tries to rename his files and directories.
:(
Definitely the biggest problem with CVS.
Why not just commit on both close() and commit()? This way all apps support versioning, and an app that can make better use of the commit() call can be updated to use it.
Or if the OS was really smart, you could configure it to commit on save() or close() depending on the application.
Gnome Storage pretty much sets out to do this in a very user frendly way, although It probably wouldn't cover /ect and other system directories.
puts ("Python r0cks\n");
I'm not sure why something that I wrote in 2001 and that appeared in print media in 2002 is news.
This is the second time I've been slashdotted for something over 1 year old this year. Previously it was the pkg-comp page, which I wrote circa 1998.
Kinda makes you wonder.
Anyway..
I suppose I should mention that these days I keep most of my home directory in subversion. I have not gotten around to writing a successor to this article yet, but it works even better than cvs, and that's probably the most common question people ask me about this article these days.
see shy jo
Yeah, what with all of those enviroment variables and directories you have to setup. Not to mention the long winded howtos you gotta read. /sarcasm
Seriously,
Newbie to install in 1 hour, it really isn't that hard. Shit, you could even use wincvs if you aren't a l337 lunix user - I bet my grandma could set it up. Then use turtle cvs as a client (on win, to avoid all of those nasty command lines) or have your ide do it. You just gotta read, we can all read right?
So, maybe not for an aol user, but certainly most people on this site could set it up - even the gnaa.
ymmv
... IIRC VAX filesystems supported version control, where you'd manipulate the filename alone to get the latest version of a file, or 'filename,version' to edit a different version. HPUX IIRC supported this as well.
/mnt/dbfs /mnt/dbfs ./ -query 'Type="file" and MIMEtype="text/plain", order by CTime'
./foo.txt
./bar.txt
./baz/xyzzy.out
However, the last time I touched a VAX was 1992 or so, and the last HPUX in 1998, so I could just as well be hallucinating.
Frankly, I'd rather see a generic database fs, I think that would be much cooler...
# mount -t dbfs mysql://dbfileserver/dbfs
# cd
# cat foo.txt
foo
# cat foo.txt/ACLs/system
0644
# echo "0664" > foo.txt/ACLs/user/foo
# cat foo.txt/MIMEtype
text/plain
# cat foo.txt/Type
file
# dbfsfind
Let the underlying DB system handle LV stuff and get relational filesystem mgmt... Can the fs driver code handle extended behaviors when referencing files as directories? It's probably performance hell, but an interesting hack I think..
I tried for ours setting up CVS on Windows, couldn't do.
I've used NFS for the same purpose in years. The NFS server also backups the shared directory tree to DAT. Same thing, only easier.
I can't see any reason why having your home directory on CVS, except the cvs rollback function. Other than that, it's just an extremly hard way of doing the above.
Hmm, didn't Microsoft's lawyers patent innovation? Or will this, since it's made with GPLed software that obviously (by Bill's standards) hinders innovation, force a rip in the space time continuum and send us all to an alternate Universe where up is down, down is up, cats and dogs live together, and Microsoft actually invents new technology instead of buying it?
iFolder, for those that don't know, is Novell's distributed folder. Work done on any computer is synchronized with a server and automatically distributed and backed up to all other clients authenticated as the same user and running the iFolder client. A simple concept that proves decidedly valuable.
I attended a conference, today actually, about Novell's jump into Linux and iFolder was stressed again and again as an excellent cross platform synergy device. I was thinking through the whole conference that couldn't you just do this with CVS, but then I realized iFolder's true advantage.
iFolder lets you authenticate against a netware tree, access with far less hoops to hop through, and provides easier administration (through iManager or ConsoleOne).
Just something I thought you should checkout if CVS doesn't quite fill your needs.
i perfer Arch myself.
I wonder what his comments look like.
---
Nov 10, 2003. Deleted old porn from pictures directory. Replaced with new, better, porn.
Nov 11, 2003. Added 'Animal House' soundtrack to the music directory. Added additional porn to the pictures directory.
"Things are more moderner than before- bigger, and yet smaller- it's computers-- San Dimas High School football RULES!"
So what is new about this, I've been doing it with Subversion and slightly modified davfs for 9 months now, saved me numerous times. It's far simpler than NFS and alot more useful..
Subversion, Apache2 all installs perfectly via apt-get, I just run apache 2 on another port..
All my core development is done this way now. I was in germany last week writing to a mounted file system in Hong Kong, and although it was a bit slower, Perfectly usable.
Taking PHP to the next level: phpmole, php codedoc, php-gtk pear installer, DataObjects for php, ldap schema viewer and
We had an PHP project containing about 1200 files, pictures, PDFs... it took about 12 hours to check in all files at once!
One big home.tar ist better and faster than to add and modify modules (sigs home/me/slashdot-sigs/) for your own home directory.
NoSuchGuy
Grundgesetz * 23. Mai 1949 - 30. November 2007 - http://www.vorratsdatenspeicherung.de/
Hm, what will happen to all my non-ASCII filenames?
Doesn't everyone use RCS to keep track of their /etc directory and so on so forth?
I mean really... what's new?
I do something sort of like this, but I use rsync instead. I just run a quick script before I log out of my laptop, which rsyncs $HOME to a master server.
This is a test. This is a test of the emergency sig system. This has been only a test.
. . . like, for example, Documentum, PC Docs, iManage, etc., etc.
Those are the commercial implementations of this concept.
This is proof at last that Open Source people are the greatest in the world. Who else would think to use a development tool in such an innovative and sexy manner? That's a rhetorical question of course but for those who missed the allusion, nobody else would. Open Source is the best, most alluring creation in the history of the universe and I genuflect at the feet of the wonderous beings who sired it.
I am waiting in moist anticipation for the day when Microsoft Word or Excel is used in a similar, orgasmically original manner. Alas, I doubt the day will come, for Microsoft has repeatedly rejected the Open Source model. Who can now deny that Microsoft are nought but fools who will perish come the day of reckoning.
> du -ch ~
(some 45 seconds later)
20G total
I've been keeping my home directory in CVS since 1996. Prior to that, I kept it in RCS, since around 1985, and briefly in SCCS.
.* /tmp/glew/old-home-directory // actually, usually saved already .
:-(
I haven't yet decided to go to Subversion, in part because I have a patched version of CVS that allows me to check into multiple CVS repositories - i.e. I can check in when on my laptop on an airplane, disconnected from the net, and can later check in to my main repository when I get connected. (Yeah, yeah, BitKeeper is a way to do that.)
As Joey's article discusses, there are minor issues with CVS'ing your home directory: use of modules, etc. I divide it into stuff that is owned by the company that I am currently working for, and stuff that I own.
When I get an account on a new machine, one of the first things that I do is create a new branch (or, a new version on some existing branch) to hold the dot files and other files
that were pre-installed in my home directory. Having saved them, I then blithely overwrite them with my standard home directory, and maybe do a quick check to see if there are any special features worth propagating to my standard home directory.
Oh, yeah: a bit of footwork to checkout
onto your home directory:
cd ~
mv *
cvs -d MYSERVER co glew-home
mv glew-home/{*,.*}
rmdir glew-home
I often find myself pasting together
modules from different repositories.
Sometimes I *want* a "cvs update"
in the root, e.g. in ~, to traverse
repository boundaries - no problem.
But sometimes I don't - e.g. I frequently
work in ~/hack, and check out stuff into there.
To do this, I have fallen into the habit
of creating a CVSBARRIER directory that is
not checked in, that prevents cvs update
from traversing.
Also, I find it useful to have a place
to put overall comments for a repository.
Typically, this is ~/README or ~/CVS-status.
The overall comments - such as "the tag
named FOO is my home directory at the time
I moved to university BAR and merged in
changes from my laptop BAZZ that had diverged"
get suck in the CVS log, via
cvs ci -f CVS-status.
Oner thing: when yiou have as much history as this, you notice when programs change their interface. E.g. nmh doesn't run my ~/.mhrc from 1994
--- Andy "Krazy" Glew
(I'm too lazy to create a slashdot account)
Remember I said you had to be able to read.
I think hooked on phonics would be a challenge for you.
ymmv
Other features of a versioning file system with a relational database to track metadata (Imagine the bastard lovechild of BeOS's BFS and Clearcase's VOB database.)
Atomic changes, commits and rollbacks would be possible.
Want to get around DLL Hell? Applications could record version of foobar.dll used at install time in an application config file and you could upgrade your libraries at will and things would still work.
Want to build your own experimental libs without fubaring the system libs? That works too.
How about the same files system looking different for different logins based on configuration rules? User noob would see the ls and other non-destructive commands, and user root would see all the administrative commands. Granted we can get this now with UID/GID magic on directories or ACL's (ugh!), but a relational DB/versioning FS would be much more powerful.
How about doing a database queries and joins about your files on a relational database that updates every time you create a new file. Kinda like locate, but built into the filesystem itself.
And no CVS would not be the best method. It's not very powerful from a version control/CM point of view. A free/open Clearcase workalike would be more suitable.
http://www.lugatgt.org/articles/cvs/
Couldn't one also use CVS to apply customization to fresh installs via `cvs update`? Probably a little easier than patch files. Maybe not.
Nothing new there.. though i suppose its more 'generic'...
and a more of a pain in the butt to manage...
---- Booth was a patriot ----
I believe this has already been patented and discussed here on slashdot before - Software Installation/Update via Internet Patented
Here here! I second that opinion Fecal Troll Matter. Good to hear that we won't be pestered by those gits again.
Un-news
That must be some great Pr0n image he looks at everyday!
From excellent karma to terible karma with a single +5 funny post...
You would only need to commit when you save a file and you would only need to do this rarely if, when you saved it, the application exported its "undo" history somehow.
So, for example, I have a large blob of code I edit in VIM. When I save it, I effectively get a "major version" in VIM but I also get my edits saved. So I can open it, then "undo" the lot, right back to when the file was empty or whatever.
I don't know how this would be done for VIM or other applications, but it must be theoretically possible. Imagine this for word processors, vector graphic editors, heck, even rastar image editors. Why not?
CVS (or whatever) would also support collaboration.
It sucks when my Undo history is lost, and no, I don't want to create 10,000 file versions to deal with in CVS either, for all edits. But CVS is a great start.
--By the time I get rich the world will have finished metamorphosing into a Socialist state and Ferraris will be, like, way taboo.
I thought this when I read the magazine over a year ago...
So this guy is using a version control system for exactly the purpose it is intended for... This is newsworthy? In that case, I probably do enough newsworthy stuff to fill a couple of magazines every day.
Hehe.. in a nerdy/technological context, you see him for what he is, a drivel spouting troll.
In the k5/political context, you see his comments as mostly thoughtful. I think this tells more about you than him.
How small a thought it takes to fill a whole life
I think the inode monitor daemon, which exists to see where there's disk activity, could interface with a cronjob, and it would be 'good enough'.
:-)
Most users don't need such granularity (every SAVE) with their files, the most requested time to roll them back to is 'yesterday', from my experience.
If the inode monitor kept a list of all files changed, and a hourly/daily/weekly cronjob took the list, filtered out what you don't want 'protected' and processed the diffs, naming and storing them, we'd have a working system.
There's no need to push a new API, it's a good idea, but because it'll never be universal it's doomed to only work sometimes. Using the inode monitor would be just as good as the competition.
Wow, I'm making BIG sentences tonight.
My question is:
where do you STORE the diffs and the info for rolling files back? Would it make sense to store them in a flat-file with a custom DB format, or would storing them in the filesystem alongside the originals (but hidden, of course)?
"Sometimes, I think Trent just needs a cup of hot chocolate and a blankie." -Tori Amos on Nine Inch Nails
Isn't this what rsync is for? CVS seems to be the wrong tool for this job.
Installing the subversion server is a bitch. Especially if you're not already running Apache 2.x. As for the client, it's not being maintained for OS X any more on Fink. So if you have OS X and you want Subversion, it's a huge pain in the ass. But the program itself is cleaner and nicer than CVS. I just wish it came with my Mac.
You don't need to keep every thing in CVS. I keep just my code and articles on CVS dammit!
.kde and /etc directory but then you wouldn't wanna go around and fix all those conflicts!
/etc directory of the master node of the beowulf system I was administering and that worked well, too.
:)
One thing you might wanna keep in CVS would be your
I was keeping the
My advice is use CVS only where it's necessary
Get a life Joey!
Please let's move on.
--exa--
I can't stand CVS... and I can deal with updating a repository database every year or two. Haven't used perforce.
Q.
Insert Signature Here
Knoppix CD (A linux that runs off a CD)
+ CVS repository on a USB Flash RAM dongle
+ knoppix.sh startup script to checkout homedir from CVS repository at bootup
= The greatest environment that you could ever hope for!
This was featured in a Linux Journal article from September 2002:
http://linuxjournal.com/article.php?sid=5976
Same guy, too.
Ummm... the last thing he did at that job was: /
/
cvs commit ; sudo rm -rf
I think he would have been smarter to do:
cvs commit && sudo rm -rf
Am I being picky?
Create a SQL server based file system, using external connectors instead of a local 'server'. Add transaction logging and you have instant roll-backable... Stick it in a real data center you get decent backups...
Export to where ever you feel safe, and it becomes accessible from wherever you need it..... run it over SSH and its safer.... it also would be platform independent.. ( unless you use something like MSSQL )
Sure its not the most efficient use of space, but space is getting cheap... Processing power is cheap too.....
---- Booth was a patriot ----
but not with my whole home directory. I have the subdirectories docs/, src/, bin/ checked in, and a directory called "cfg" that contains my dotfiles - bashrc, profile, emacs startup files and various lisp files and mozilla config files. When I first set up a Unix/Linux/MacOSX system I create a symlink from the dotfiles in my cfg directory to my home directory. Under Windows, I have a .emacs file that loads the emacs file in the cfg directory.
I also have a bunch of shell scripts that tell me what files haven't been checked into CVS. Forgetting to check files into CVS is quite an issue, as well as not doing a "cvs commit" at the end of the day.
Though in general arch is very good at handling these sorts of problems, there are problems with using arch to back up home directories. The most significant problem is that arch is a bit picky when it comes to filenames. As an example, arch does not allow spaces in filenames. There has been talk off and on about removing this restriction from arch. Don't hold your breath for this restriction to be lifted though -- the maker of arch, Tom Lord, seems to be against this idea.
For us non-programmers (and being somewhat ignorant now and then), I wondered what my local pharmacy would think if I carried my files there. A search on Google, gave me a few choices for CVS. However, Concurrent Versions System is foreign to me. Is this a ?nix only program or also for MSwindows or what? A little explanation of mnemonics is always appreciated.
Linux Journal Covered this over a year ago... Issue 101: CVS homedir...
"It's not like your minds are as open as the source you love..." - Me to the majority of Slashdot.
Smitty825: AvantLegion: --
Now hold on. Just because his sig is "Doh!" doesn't automatically mean he's anti-Bush.
It might just mean that he's pro-Homer Simpson.
-- MarkusQ
why not just do an nfs mount? or have it on several computers at home?
if it's a remote setup, then nevermind.
My box runs WinME, with a software by Adaptec called GoBack. This "technology" silently keeps track of every modification to my disk, will let me revert the entire drive (or individual files) to some state in the past.
At every boot I'm allowed to press a key in order to enter the interface and revert my drive. I have used this about twice to fix some stupid "Jeez, I wonder if these two versions of the same program can co-exist?" things I've f'ed up.
Slick. The documentation for this program claims that it only uses system idle time, but I'm wondering if it isn't causing my disk an undue pounding. During idle times it can be heard writing and it annoys me.
At any rate, it works great, but doesn't do what the author of the article suggests, and that is to allow him access to his home directory from other machines. (i.e., when he mentions that a bash shell on another box is completely unmodified it pisses him off)
Issue 101: CVS homedir
Posted on Sunday, September 01, 2002 by Joey Hess
...it's not quite CVS, but Windows XP already has the notion of "restore points" to bring your system back to however it was when the restore point was made. Some software installers automatically create the points before installing themselves. I haven't ever tried to recover a system with one, but it's a neat idea at least.
Does anyone have any good RCS/CVS HOWTOs, guides, cookbooks, etc? I've used RCS a tiny amount. I would love to learn how to use them more. This has always been on my to do list. Doing what this guy did would be quite interesting. Suggestions? Tips? Thoughts?
I do this using a cron job that runs every hour and a little bit of rsync logic. Our main share is /export/public, every hour /export/public is recreated in /export/public/archive/date-time/. It's not totally recreated though. Files that didn't change since the last run are made as hard links to their previous versions. That way you can go back to any time or date, but only one copy of a file is stored.
Dear Citizen, Thank you for using Homeland Security CVS! Your portable and _secure_ online storage.
It seems you have changed your home directory. Please provide a description of the changes below.
Here is a better solution that will work with multiple different types of machines:
1. Set up CFengine on all of your boxes (microsloth windows too).
2. Configure a master system with all of your working files.
3. Configure your slave systems to query the master and copy over new/changed files.
Once you have this set up properly, it takes care of itself. As an added benefit it makes managing multiple machines a snap.
You can even have it kick off an application/script (like CVS) when something changes - to capture it in your archive if you like (so you can roll back as needed).
I love revision control, but managing it by hand is a pain in the behind.
Ultimately, I want to not have to worry about locations of files at all - depending instead on meta-data to provide searchable, annotatable links into the actual files with overlays of my own notes, similar to the 'Annotea' project module in the W3C AMAYA web browser (this is pretty cool - you can 'annotate' documents without altering their content - even documents on other servers; the system keeps 'RDF' xpointers and xlinks on your home system, and amaya renders your notation links in the web page as you view it).
Lodragan Draoidh
The more you explain it, the more I don't understand it. - Mark Twain
And NOVELL has had this feature in their Netware line for about six years now. Netware 4.11 has it, and they're up to 6.5 now!
http://www.hpl.hp.com/personal/Alistair_Veitch/pap ers/elephant-sosp/efs.pdf
The idea is that an immutable delete is a carry-over from oldentimes when disk space was a scarce resource. If versioning and history were integrated with the filesystem it would fundamentally change the way we use it...
Hardly...
Been doing this for a long time, and for more than just home directories. System configs, web sites, security info etc. Makes rebuilding a server trivial, and trivializes backups of the most important stuff.
Joey says in a comment below the article that these days he keeps most of his home directory in Subversion rather than CVS, and that he hasn't gotten around to writing an updated version of the article.
"I may not have morals, but I have standards."
I use CVS to distribute everything from webserver files, to installation releases, webserver configs, home directories, so on years ago.
Damn, should've patented it when I had the chance!
That's "GNAA", and that's "wishful thinking." Yes, it would be nice to be rid of the trolls, but so long as people exist, there will be trolls.
This is not part of my post. It's my signature. I bet you're disappointed.
Hey I submitted the article because a guy at work pointed it out to me. I am a bit new to CM, and this seemed like the sort of really crazy idea that works.
Now I am going to take a look at subversion. But I don't think I could achieve the iron control of file structure thats needed for this approach to work.
more about me
cp -R /home/stupid /mnt/floppy
cos it was in netware years ago
It's called the village idiot phenomenon. When you read circletimessquare on /., it's like listening to your, otherwise friendly, village idiot in Big City. Somehow, the scenery doesn't match.
More than mere navel gazing.
So does Windows XP Pro. It's called "System Restore". I don't think that it works for every single file, but it does a lot of that stuff, keeping old config files around and so on.
It even backs up viruses!
What I'd like to see if a sysadm's guide to using RCS/CVS in their daily administrative tasks. Make sense?
I actually already do a similar thing with a makefile. All I had to do was use a combination of scp, rsync, and ssh commands and with one command I can synchronize recursively data on multiple hosts, which are just listed in a file. Although, non-versioning CVS always works good, too.
have you every tried to install and set up subversion?
Yes, it's just easy (and there are packages for every major distro out there).
plus, after years and years of development, it's still point-oh-something and specifically states they can only guarentee that your repository can be read with x number of versions after the version that created it.
WTF ?
SVN is going beta any time soon (and 1.0 soon after that). There is no such restriction as far as I know, where did you get that ??
I have my home directory under SVN, and a lot of repositories, including one with over 300 Mo of data (binary, text, sources, etc). Never lost one single bit.
Don't misinform people on this great project, please, it deserves attention !
theefer
Can I arch easily to do the same? I should, shouldnt i?
On an intranet that I run for a customer, I have weaned them off MS Word, and now everything is stored in OOffice XML format.
When they commit a document, the webserver at the backend unzips the OOffice file, and then commits it to CVS.
Being raw text, you can use cvsweb to be able to display versions of documents over the web, and also to do graphically enhanced diffs of documents.
Dont know if Microsoft already has something like this ? CVS works a treat for this, and the customer is pretty happy.
Well, THAT would be a distributed backup...
rcsvi is a simple wrapper for vi that puts edited files under revision control. It does not support any vi flags. It only takes one file argument and an optional revision number for reverting to previous versions. A few examples:
Voila. You now have your passwd file under revision control. More examples:To make a complete backup of your system configuration:Now you may ask "ok i want to edit multiple files and/or do some other trickery". Don't. It's a simple tool, that i'm using for years now with great satisfaction.Check it out here
I've been using Backup4l and am quite happy with it.
It's a multilevel incremental backup tool that every night mounts an extra HD that I use for backups and puts only the changed files to tar.gz files. It also deletes old file on the fly and I currently store about 6 months of history.
Restoring files is very easy ('backup4l --restore */pr0n/*.jpg', optionally with a specific date), no hassles with manual commits, binary files and removed, moved, renamed files. Sure, it's not version control per se, but works fine for me.
Wouldn't it be easier and more efficient to use a log-filesystem? And VNC?
Just say no to license servers!!
A quick hack would probably be possible so that, in the event of a file being clobbered, the current version is automatically checked in (together with some sort of 'was clobbered' note).
You'd need a 'ignore clobber' lock to allow this to be bypassed.
Just a thought. (Think of this as analogous to copy on write if it's any help.)
John.
John_Chalisque
"Keeping your home directory in CVS is not all fun though"
ah well. you cant have everything i guess.
I was doing this with Perforce and OS 9 years ago...and I know others that did it long before me.
CVS serves great for our /etc directory. There are 9 administrators that may fiddle around with the configuration and CVS is used to keep track of the who-changed-what-and-why thing.
All it takes is a bit of discipline to check in your changes in case you're not used to it. A daily cvs -nq up -dPR helps to find the files you forgot to check in.
I wanted something that could give me the sharing of home space that NFS gives, but that would still be there when I unplugged my laptop from the LAN.
Since, in general, I'm not working on my home space independently on different machines anyway, occasional "cvs up"s do the job well enough.
Registering accounts later than some other chrisb since 1997
Only on traditional volumes - with NSS volumes (ie. most netware servers installed in the last 5 years or so) Salvage retrieves folders too. Was the big reason for us to move our old volumes over on the fileservers :)
I don't see a huge problem with the way you can "rename" a file in CVS:
mv oldname newname
cvs del oldname
cvs add newname
cvs ci -m "Renamed file oldname to newname"
OK, so this requires a little bit of discipline to make the comment such that when you come back later to view logs, you can make the connection between the old and new filenames, but I'd say it was acceptable.
I also don't have much of a problem with what happens if you later decide to add the file oldname again - it simply resurrects the old file and history.
The trouble I have is with directories - you can't really move these (or even delete them gracefully - cvs co -P is a bit naff).
How about putting deleted directories in the Attic in the repository? That way they wouldn't hang around like an unwelcome smell. And when you move a directory you could employ much the same tactic as for files - put the entirety of the oldname tree in the Attic of the parent directory, and add a complete copy of the tree to the repository under the new name.
OK, so this could be extremely inefficient as far as storage goes, and it might require a bit more effort to access the "complete" history of a file, but it would be enough to keep me happy.
The other trouble I have with CVS is when the files get to about 100MB, it gets impossible to retreive old versions for some reason.
Hmmmm.
Otherwise, CVS is indeed the best thing since sliced bread.
I am working with setting up AFS here at work and so far it seems pretty cool. It is fully distributable, the only issue I see is lack of returning error codes and documentation. But so far it seems pretty stable. Even works over Cisco VPN in linux. Although I am still looking on how to tweak the cache timeouts for afsd.
Microsoft aggravates my tourettes syndrome.
seec h/pap ers/elephant-hotos/elephant.pdfc .ca/spider/feeley/research
http://www.hpl.hp.com/personal/Alistair_Veit
http://www.cs.ub
[Quote] Every morning (er, afternoon) when I came into work, I'd cvs up while I read the morning mail. In the evening, I'd cvs commit and then update my laptop for the trip home. When I got home, I'd sync up again, dive right back into whatever I'd been doing at work and keep on rolling until late at night--when I committed, went to bed and began the cycle all over again. [/Quote]
Somebody desperately needs a girlfriend...
Any technology distinguishable from magic is not suficiently advanced.
Any technology distinguishable from magic is insufficiently advanced. - Geek's corollary to Clarke's law
I have my cvsroot/ directory in my home directory. So I obviously can't put _that_ in CVS...
-- Ed Avis ed@membled.com
This was mentioned in Sysadmin in the last year or year and a half. I don't remember when exactly. It might be worth looking if you are that interested in recreating this concept.
Doug
Always value the individual over the system. --Bruce Lee "I don't need a Sig - I have a custom 191" - me
You can use it to roll back the wole system 5 to 9 times a day when some asshole discover yet another vulnerability on IIS and decides to 'test it on your server'.
...
...
Or, when you install the new version of that stupid control panel, and it fucks your registry up
Or when one some luser create a file called ' ? * * lpt1 prn' in an incoming directory, shure, just roll the changes back
Good way to administrate a system, until this tool from the devil fucks up your registry, eats 90 MB of RAM, 20 % of CPU, and make you reinstall windoze after causing you 3 hours of downtime, Shure!, it's the best!! Keep creating such amazing software bill!.
WTF am I doing replying to an AC at 5 A.M on a Friday night?
OpenBSD has a set of scripts that mails you, among other things, information about changes made to configuration files
The best way to predict the future is to invent it
I wonder whether you really looked into Arch because saying it is a hack onto CVS can not be further from the truth. If Arch is close to something then it is BK as Arch is also a distributed SCM whereas CVS/SVN/Perforce are just centralised SCM.
.
I agree Perforce is nice (I'm been using it for 4 years now) but I'm converting everything to use Arch as the distributed nature of Arch makes it much easier to manage repositories in several places while having all of them synchronised.
Do yourself a favor and look again at Arch
Having the home directory synced with my home PC, would be in violation of some corporate policy, but would have allowed me to continue without impact.
Unfortunatly, I need about 200Gb of storage at home for some of the large IC test patterns that I work on at work. So CVSing my entire home wouldn't be practical... but a all the . files would.
There have been some interesting developments in "home" directories and file management. There was some Discover/NOVA show about a file system that is basicly a stream of data in time... in that data should be orginized not by a tree structure (or file cabinet like setup), but as a serial stream orginized by access date or arrival date.
Also I had heard that some next gen disk filesystems would be database driven, so the CVS setup might make more sense. Certainly if the database/compression algorithms are in hardware, it would be fast, but you would need some firmware to allow for changes. --- OK babbling off.
Ross Youngblood
and one or two cool ideas made popular by debian in the 90s gives you the right to be a close-minded, elitist, gentoo basher?
I use gentoo, but I realise that other distros also do/did cool things (especially debian - in many cases I would rather use it) and I don't mentally grep for their names and post hostile replies whenever I encounter them.
> I wonder why CVS, and not something more
/. news today. He has since switched to using subversion.
> advanced, like Arch or Subversion?
Joey uses subversion now. Scroll down to a post from him. He wrote the article in 2001, it was published in LJ last year and is
I already used this system for more than 1 year
Don't you know it is now both immoral and criminal to think beyond the next quarterly report?
Or your views might be seen as subversion.
Karma: It's all a bunch of tree-huggin' hippy crap!