Slashdot Mirror


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."

74 of 414 comments (clear)

  1. Described in Linux Journal months ago by HuguesT · · Score: 2, Interesting

    This is innovative but not new, the LJ article is dated September 2002.

    Waky, waky editors?

    1. Re:Described in Linux Journal months ago by kajoob · · Score: 3, Funny

      I like ragging the editors as well, but come on, the blurb said 'innovative' and that is all. There's nothing about "new" mentioned anywhere in there, you pulled that out of your ass just so you could complain. Now quitcherbitchin and just read the kewlness that is home directies in cvs. ;)

      --
      Quidquid latine dictum sit, altum viditur
    2. Re:Described in Linux Journal months ago by hondo77 · · Score: 3, Insightful

      There's nothing about "new" mentioned anywhere in there, you pulled that out of your ass just so you could complain.

      Merriam-Webster defines news as "a report of recent events". If Slashdot is "News for Nerds" then an article from over a year ago ain't news.

      --
      I live ze unknown. I love ze unknown. I am ze unknown.
    3. Re:Described in Linux Journal months ago by zsau · · Score: 4, Insightful

      Perhaps it's stuff that matters?

      --
      Look out!
  2. Here's a piece of advice by Rosco+P.+Coltrane · · Score: 5, Funny

    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
    1. Re:Here's a piece of advice by Anonymous Coward · · Score: 3, Funny
      CVS will also be a great help when you download pr0n that have the same file names.

      like: untitled.bmp and untitled.bmp - even though they're two different pictures! It'll save the time to rename whole directories!

      And, you can hide all your pr0n from prying eyes too! OOooooo Ahhhhhh!

      Unless, you've named your tree - jerkoff_material.

  3. CVS takes files? by cuppm · · Score: 5, Funny

    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.
  4. My favorite directory to put in CVS by Beryllium+Sphere(tm) · · Score: 4, Interesting

    /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.

    1. Re:My favorite directory to put in CVS by Rosco+P.+Coltrane · · Score: 4, Funny

      My favorite file to put in CVS : /dev/hda1. Takes a while to recover an old file though ...

      --
      "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
    2. Re:My favorite directory to put in CVS by Espectr0 · · Score: 4, Informative

      /etc

      Or you can just use Gentoo, which does this automatically when you update your system, pointing out the location and files that are different, all with diff output, and the ability to merge the changes, overwrite or ignore the change.

    3. Re:My favorite directory to put in CVS by MobyTurbo · · Score: 2, Informative
      /etc
      Or you can just use Gentoo, which does this automatically when you update your system, pointing out the location and files that are different, all with diff output, and the ability to merge the changes, overwrite or ignore the change.
      NetBSD does this with etcupdate and FreeBSD does this with mergemaster. Where do you think Gentoo got this from? :-)
    4. Re:My favorite directory to put in CVS by inferno0069 · · Score: 5, Informative

      Where do you think Gentoo got this from?

      Debian.

  5. I wonder..... by The+One+KEA · · Score: 4, Interesting

    Has anyone tried this with BitKeeper?

    --
    SCREW THE ADS! http://adblock.mozdev.org/ Proud user of teh Fox of Fire - Registered Linux User #289618
    1. Re:I wonder..... by Kourino · · Score: 4, Informative

      You wouldn't do this in Bitkeeper if you were a privacy freak. Remember, the Bitkeeper liscense requires that you maintain open logging. Realistically, this means that info about what files you change get transmitted across the network; I don't know if it's encrypted or not. It's not that big of a deal, but I'm sure someone here would care.

      That being said, doing it in BK would be a compelling alternative if you wanted to use the same /home repo across (say) three or more machines, since you could take advantage of its more complex merge operators. Arch or SVN also might be good ideas. (Don't have any experience with Subversion, though.)

    2. Re:I wonder..... by Otterley · · Score: 2, Informative

      Wrong. BitKeeper does not require open logging for single-user, single-host repositories.

    3. Re:I wonder..... by Trolling4Dollars · · Score: 2, Funny

      Wait, I have a "better idea" (TM). Why don't we get servers to backup the data on the servers that back up the data on the servers that back up the data on the servers that backup the data on the ser

      ^Z
      [1] loop ends

  6. Why just home? by AuMatar · · Score: 5, Interesting

    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?
    1. Re:Why just home? by PhilipPeake · · Score: 4, Informative
      Ever hear of VMS ?

      It had a filestore with file versioning - about 30 years ago.

    2. Re:Why just home? by Jellybob · · Score: 5, Informative

      I'll get modded down to oblivion for mentioning an MS product in a positive light, but Windows XP+2003 Server supports this already.

      Users can rollback to previous revisions of files that they've saved to the 2k3 server, saving the sysadmins the time of restoring *another* accidently deleted file from the backup tapes.

    3. Re:Why just home? by pclminion · · Score: 5, Insightful
      The basic problem with versioning in the file system is deciding when to commit. Do you commit for every byte written? Of course not, that would be a massive waste of time and disk space. Do you commit once for every write() call? That suffers the same problem, because sometimes writes are very small, and you can never predict in advance how large a write will be.

      You can't automatically commit after every xxx bytes of data written, because that means there will be a bunch of intermediate states on disk, most of which are probably bogus (this argument applies to the above two options as well).

      The only thing that even remotely makes sense is to commit on close(), but that doesn't make sense for applications like text editors which keep the file open for the entire duration. You want each SAVE to be a commit, not each CLOSE.

      What this boils down to is that there must be application level support for the commit operation (i.e., a new commit() syscall). The application has to specifically be coded to tell the operating system "Ok, I'm done with the revision, commit this now." And that means every application on the system will have to be tweaked to make the necessary commit calls, not to mention the thought that goes into deciding WHEN it is appropriate to commit. I would wager that a lot of maintainers wouldn't bother to make those changes, and as a result those applications wouldn't support versioning.

      I agree that a versioned file system would kick ass, and there are even some out there already (Google for "versioning filesystems"). But they tend to be special purpose. I don't see how it could be cleanly and transparently integrated into a general purpose system such as Linux.

      Note that I didn't bother to check CiteSeer to see if there is academic work on this before posting this comment. So if anyone knows of any work toward that end, I'm sure a lot of us would appreciate a pointer to it.

    4. Re:Why just home? by AuMatar · · Score: 4, Informative

      To make this more legible- a text editor, for example, does not have the file open the entire time waiting for input. It opens the file, reads it, then closes it at startup. When the user hits save (through keyboard commands, mouse click, whatever), the editor opens the file again, this time in write mode, writes the data, and closes it. By this model, close could be the commit function, and open could be the checkout function.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    5. Re:Why just home? by Jim+Hall · · Score: 2, Informative

      Ever hear of VMS ? It had a filestore with file versioning - about 30 years ago.

      Not just VMS. Apollo DOMAIN had something like this, too. -jh

    6. Re:Why just home? by bug-eyed+monster · · Score: 3, Informative

      It's been quite a while since I used VMS... IIRC the problems we had we the VMS versioning:

      - It created a new version every time you saved, so just going through a few change/compile/fix cycles (for example) would create lots of versions clogging up the disk.

      - The old versions were in the same place as the latest version, and if you wanted to delete a file, you'd just say "delete blah.blah.*" to wipe out all versions (and therefore all traces of the file)... then say "oops!"

      It was useful in many cases, but in a different way from CVS. A very useful solution would be to have file-level journaling with the ability to throw in comments and create tags and branches.

    7. Re:Why just home? by cpghost · · Score: 2, Insightful

      This is the reason database transactions exist. A filesystem based on CVS would need the concept of (atomic) transactions: you open(2) the file, therefore starting a transaction. Every access (read(2)) and modification (write(2)) etc... goes in the transaction _only_, and at close(2), the transaction gets commited.

      The funny part starts at close() (or commit())-time, when you need to resolve conflicts. Huh...

      --
      cpghost at Cordula's Web.
    8. Re:Why just home? by Anonymous Coward · · Score: 2, Insightful

      I'll get modded down to oblivion for mentioning an MS product in a positive light, but Windows XP+2003 Server supports this already.

      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.

      And no, you won't get modded down for mentioning an MS product in a positive light as long as your mention _makes sense_ (and doesn't incorrectly trash Linux in the same breath). However, the second they come up with a (-1, Irritating Marytr Complex) mod, you're dead. :)

    9. Re:Why just home? by angst_ridden_hipster · · Score: 2, Funny

      What? Like VMS?

      (ducks)

      --
      Eloi, Eloi, lema sabachtani?
      www.fogbound.net
    10. Re:Why just home? by Cramer · · Score: 2, Funny

      [cramer:ttyp0]dominion:~/[10:43pm]:cat /etc/redhat-release
      release 4.1 (Vanderbilt)


      *whistles innocently*

    11. Re:Why just home? by bcrowell · · Score: 4, Interesting
      The basic problem with versioning in the file system is deciding when to commit.
      I use Unison for this, and it works great. A commit happens whenever I choose to run Unison. I'm a human. Unlike a computer, I understand what I'm doing and why. I know when I'm done working on something, and when I'm ready to synchronize my files.

      From the article:

      • I get three major benefits from keeping my whole home directory in CVS: home directory replication, history and distributed backups.

      I get all these benefits from Unison. Admittedly, the history only gives me snapshots at two different times (time 1=now, time 2=last time I committed), but that's always been good enough for me. Deleted the wrong file? No problem -- get it back from the other machine.

      Unison is also cool because, unlike CVS, it (a) is easy to set up and maintain, (b) is quick and easy to run, and (c) works just as easily with binary files as with text files.

  7. Or just RCS by A+nonymous+Coward · · Score: 2, Interesting

    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.

    1. Re:Or just RCS by pHDNgell · · Score: 5, Informative

      I have a script that does all of this for me:

      http://bleu.west.spy.net/~dustin/soft/filemonitor

      You point it at a dir and run it from cron nightly. It also gives you a handy nightly mail telling you what changed. Excellent for those late night changes to systems where you don't remember what you did...or if someone else made some late night changes that you'd like to undo.

      --
      -- The world is watching America, and America is watching TV.
    2. Re:Or just RCS by A+nonymous+Coward · · Score: 2
      1. Create an RCS subdir in the dir you want to version control.
      2. For each file in that dir that you want to version control, use ci -i filename. It will ask for some kind of overall comment, an empty message is fine.
      3. The file has been removed from the directory; use co -u to get a read only copy back.
      4. The file is now read only. When you want to edit it, use co -l to check it out locked and writeable.
      5. Edit the file with your favorite editor, or whatever else you want to do with it.
      6. Use ci -u to check in this latest version and make it read only again.

      Use man rcs to see details on how to undo versions, check out specific versions, etc.

      Also use that same man command to double check these instructions.

      Some editors have RCS and CVS version control built in, such as emacs. Probably others too. Maybe vim.
  8. Re: an innovative solution by Anonymous Coward · · Score: 4, Funny

    ... quick, patent it!

  9. Re:I keep my life in a CVS repository by Rosco+P.+Coltrane · · Score: 5, Funny

    No. But you can do this right now:

    cvs commit suicide

    --
    "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
  10. Sourceforge by Smitty825 · · Score: 5, Funny

    I'll put my home directory on Sourceforge! Everyone can now help me maintain it!

    --

    Doh!
    1. Re:Sourceforge by AvantLegion · · Score: 5, Funny
      I patched your political science essay.

      I fixed all the anti-Bush bugs.

  11. How does he handle renaming and erasing in CVS? by Anonymous Coward · · Score: 5, Interesting

    'cause CVS loses the history in these operations.

    1. Re:How does he handle renaming and erasing in CVS? by neonleonb · · Score: 5, Interesting

      Alias mv to execute some shell script:
      mv $1 $2
      cvs remove $1
      cvs add $2
      cvs commit -m "move $1 $2" $1 $2
      You might want to add some script to deal with the case where $2 is a directory, but that shouldn't be too hard.

      That way, information about the move and the previous file status is kept.

  12. CVS, eh? by Kourino · · Score: 4, Informative

    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.

    1. Re:CVS, eh? by self+assembled+struc · · Score: 4, Informative

      well,

      have you every tried to install and set up subversion?

      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.

      as for arch, i've been looking into it, but it's still a hack onto cvs.

      subversion gets some of it right, but at my old company we used perforce and honestly, i'm spoiled and i've been trying to find a free (just as in beer, free as in speech would be nice, but i just want to get my work done quickly and without hassle) source control client that can mimic the functionality and stability of perforce, and i've yet to find one.

      too bad my new place won't shell out the $650/seat for the license...

    2. Re:CVS, eh? by pHDNgell · · Score: 2, Informative

      as for arch, i've been looking into it, but it's still a hack onto cvs.

      WTF are you talking about? Arch is only related to CVS in that it's in the same application category.

      i'm spoiled and i've been trying to find a free (just as in beer, free as in speech would be nice, but i just want to get my work done quickly and without hassle) source control client that can mimic the functionality and stability of perforce, and i've yet to find one.

      We use perforce at work and I'm fed up with the lack of functionality compared to what I get from arch (which I use for most of my home projects and home dir and stuff).

      We have a few integrations with other software that makes perforce tolerable (bug tracking mostly). These could be done with arch as well, but it's not worth it to me yet.

      --
      -- The world is watching America, and America is watching TV.
    3. Re:CVS, eh? by vslashg · · Score: 5, Informative

      I agree that Perforce is awesome. But here's something you may not know -- Perforce is completely free for the kind of thing this article is talking about doing.

      Specifically, Perforce is available for download here. Without a license, it only supports two users and two clientspecs... not enough to manage a project shared among developers, but wonderful for managing your code in home projects. More good news: Perforce is free-as-in-beer for use in developing open source projects.

      (This isn't meant as a holy war... I know that many of you might think that source control package Foo is better than Perforce. You may be right. I'm just pointing out some Perforce licensing facts for those who like Perforce.)

    4. Re:CVS, eh? by retinaburn · · Score: 2, Informative

      If you look at the bottom of the page, he does in fact say that he uses Subversion. He just hasn't updated the article to show this.

    5. Re:CVS, eh? by aardvarkjoe · · Score: 4, Informative

      have you every tried to install and set up subversion?

      Subversion is pretty easy to install and set up as long as you don't use the Apache interface. It's pretty much just a matter of downloading the subversion and libdb archives, and doing "./configure; make; make install". I've never had any problems with it, and it is rapidly approaching version 1.0.

      One of the main things that they ought to make clear is that the http interface is a nightmare to set up -- with the exception of making publically-accessible repositories, using the svnserve method over ssh is a far better choice.

      --

      How can we continue to believe in a just universe and freedom to eat crackers if we have no ale?
  13. auto-backups the plan9 way by DrSkwid · · Score: 4, Interesting

    Plan9 has the mantra : "file creation is forever"

    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 /sys/src/libc/port/*.c

    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
    1. Re:auto-backups the plan9 way by Rosco+P.+Coltrane · · Score: 5, Funny

      Right, so on plan9, you can recover all your previous file versions, for example, letter_to_boss.txt :

      v1.0: "You stupid fuck, why don't you give me a raise some day?"

      v1.1: "You tight-pocketed capitalist, isn't it high time you gave me a raise?"

      v1.2: "Hey Boss, I really think I deserve a raise, I've been working on this project for so long."

      v1.3: "Hello Boss, I respectfully request that you should consider giving me a raise, as I think have proven to be a reliable, hard-working employee. Please?"

      v1.4-FINAL: "Dear Mr. Schmoe, I wish to apologize in advance for stopping work on our most important project for five minutes, but I would like to present an idea to you : you see, ever since I have started working at 6-pack computing, I've tried to be a model employee and ... ... ..."

      --
      "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
  14. Subversion rocks! by Anonymous Coward · · Score: 2, Interesting

    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.

  15. Oh I like that by The+Munger · · Score: 3, Insightful

    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!
  16. Re:slashdotted... by cuppm · · Score: 2, Informative

    Joey shows you how to keep track of everything with CVS.

    I keep my life in a CVS repository. For the past two years, every file I've created and worked on, every e-mail I've sent or received and every config file I've tweaked have all been checked into my CVS archive. When I tell people about this, they invariably respond, ``You're crazy!''

    After all, CVS is meant for managing discrete bodies of code, such as free software programs that are worked on and available to a lot of people or in-house projects that are collaboratively developed by several employees. CVS has a reputation of being a pain to deal with, and it has a lot of crufty bits that regularly drive users up the wall, like its mistreatment of directories. Why inflict the pain of CVS on yourself if you don't have to? Why do it on such a scale that it affects nearly everything you do with your computer?

    I get three major benefits from keeping my whole home directory in CVS: home directory replication, history and distributed backups. The first of these is what originally drove me to CVS for my whole home directory. At the time, I had a home desktop machine, two laptops and a desktop machine at work. Rounding this out were perhaps 20 remote accounts on various systems around the world and many systems around the workplace that I might randomly find myself logging in to. I used all of these accounts for working on the same projects and already was using CVS for those projects.

    I'm a conservative guy when it comes to my computing environment (I've used the same wallpaper image for the past five years), and at the same time I'm always making a lot of little tweaks to improve things. Whenever I go to work and something wasn't just like I had tweaked it the night before, I'd feel a jarring disconnect, and annoyingly copy over whatever the change was. When I sat down at some other system at work, to burn a CD perhaps, and found a bare Bash shell instead of the heavily customized environment I've built up over the past ten years, it was even worse. The plethora of environments, each imperfectly customized to my needs by varying degrees, was really getting on my nerves. So one day I cracked and sat down and began to feed my whole home directory into CVS.

    It worked astonishingly well. After a few weeks of tweaking and importing I had everything working and began developing some new habits. 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. As for the systems I used less frequently, like the CD burner machine, I'd just update when I got annoyed at them for being a trifle out of date.

    It only took a few more weeks before the advantage of having a history of everything I'd done began to show up. It wasn't a real surprise because having a history of past versions of a project is one of the reasons to use CVS in the first place, but it's very cool to have it suddenly apply to every file you own. When I broke my .zshrc or .procmailrc, I could roll back to the previous day's or look back and see when I made the change and why. It's very handy to be able to run cvs diff on your kernel config file and see how make xconfig changed it. It's great to be able to recover files you deleted or delete files because they're not relevant and still know you've not really lost them. For those amateur historians among us, it's very cool to be able to check out one's system as it looked one full year ago and poke around and discover how everything has evolved over time.

    The final major benefit took some time to become clear. Linus Torvalds once said, ``Only wimps use tape backup: real men just upload their important stuff on FTP and let the rest of the world mirror it.'' I'm not a real enough

    --
    I have no sig, the eyebrows seal the deal. That's right. Eyebrows.
  17. ssh private keys by smcavoy · · Score: 2, Insightful

    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.

    1. Re:ssh private keys by dedave · · Score: 4, Informative

      This isn't insightful. He specifically states in the article that he has a .hide directory that _doesn't_ get "sown like seeds across a number of systems" just for this very reason. Bah.

    2. Re:ssh private keys by Slime-dogg · · Score: 2, Funny

      You read the article? You must be new here.




      Bows before a clapping audience. Such karma-whoring is to be admired.

      --
      You need to restart your computer. Hold down the Power button for several seconds or press the Restart button.
  18. Great for Mozilla settings! by adamfranco · · Score: 4, Interesting

    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
  19. Pun Intended... by Vaulter · · Score: 5, Funny


    "Hold on a minute, I've got to check out this porn."

    --
    I don't have a sig...Do you??
  20. Re:Not Innovative by TheZax · · Score: 5, Funny

    What's next? Keeping system configuration in CVS?

    Slow down, I can only patent so quickly...

    Note to self:

    1. Patent home dir in CVS

    2. Patent system configs in CVS

    3. Patent pr0n in CVS (note -kb)

    --

    JWall: GUI client for IPTables
  21. unison is probably a better solution by penguin7of9 · · Score: 4, Interesting

    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.

    1. Re:unison is probably a better solution by penguin7of9 · · Score: 2, Interesting

      Rsync can actually be used in that fashion too, BTW, right out of the box, and it works well too.

      No, it cannot. rsync is a uni-directional file synchronizer and it doesn't have an interactive interface. unison is a bi-directional file synchronizer with non-timestamp-based change detection and a GUI for resolving conflicts. The two are completely different things. unison does much more than rsync.

      However, versioning allows you to go back to the most useful prior version of the file, not just the most recent. What if you finally managed to get your configuration right last week, but that version got overwritten by the version with "just one more tweak" that was used for this week's rsync/unison run?

      Unison can create histories and backups if you like, even on a path or type-dependent basis. In several years of using it, I have never bothered because all the applications I use already keep their own backups or histories. (Incidentally, rsync can keep version histories and backups, too.)

      I guess I should mention, just for the sake of full disclosure (not because it's really relevant) that I'm a product architect at a company seeking to do provide just this sort of "go back to any time" functionality at the block level. Of course I have some strong opinions about the relative utility of "single point in time" vs. continuous backup/restoration, or I wouldn't have taken the job.

      Such systems have been around since at least the 1980's. Most people who have used them (including myself) have found them to be profoundly useless even though they worked exactly as advertised and were really easy to use.

      Over several decades of experience with such systems, people generally have come to the conclusion that versioning and histories are application-dependent and best left to applications. That's why systems like Emacs, Microsoft Word, etc. have that sort of thing built in and why people use CVS on a per-project basis.

      (And, in the interest of full disclosure, I have no commercial interest whatsoever in any of these systems.)

    2. Re:unison is probably a better solution by bfields · · Score: 2, Informative
      rsync is a uni-directional file synchronizer and it doesn't have an interactive interface

      Yes, but it's trivial to run it twice, once in each direction, with arguments that result in updates propagating in both directions.

      I used to depend on exactly that technique to keep my home directories in sync. It was a pain in the butt. If you have a file named "foo" in replica A and no such file in replica B, then rsync has no way to tell whether it should delete "foo" from A or copy it to B. For that you need to know some minimal information about what the replicas were like at the time of the last synchronization. Unison takes care of all this for you in a very clever way. It's really worlds better than just using rsync. I highly recommend it.

      --Bruce Fields

  22. Aegis by axxackall · · Score: 2, Informative
    Check this version control comparison for more options.

    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 !
  23. Renaming a directory by Henry+Stern · · Score: 4, Insightful

    I shudder to think what happens when he tries to rename his files and directories.

    Definitely the biggest problem with CVS. :(

  24. kinda old article; update by joey · · Score: 5, Informative

    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
    1. Re:kinda old article; update by Anonymous Coward · · Score: 2, Funny

      You're new around here aren't you?

      Yeah, that's why he's got a user ID of 315! :)

  25. Innovate? by cant_get_a_good_nick · · Score: 2, Funny

    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?

  26. Sounds like iFolder to me. by Krondor · · Score: 2, Informative

    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.

    1. Re:Sounds like iFolder to me. by KKBaSS · · Score: 2, Informative

      You can get a free 10mb online demo here

  27. The comments say he uses subversion now by Polo · · Score: 5, Informative
    Did you see his followup reply at the bottom??
    Re: CVS homedir (Score: 0)
    by Anonymous on Tuesday, November 11, 2003

    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.

    -- Joey Hess
  28. Been doing that a *long* time by Anonymous Coward · · Score: 5, Interesting

    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.

    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 * .* /tmp/glew/old-home-directory // actually, usually saved already
    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)

  29. Yeah, From the article... by twoslice · · Score: 2, Funny
    I've used the same wallpaper image for the past five years


    That must be some great Pr0n image he looks at everyday!

    --

    From excellent karma to terible karma with a single +5 funny post...
  30. Rsync anyone? by pico303 · · Score: 3, Insightful

    Isn't this what rsync is for? CVS seems to be the wrong tool for this job.

  31. Old news by whereiswaldo · · Score: 5, Informative


    This was featured in a Linux Journal article from September 2002:

    http://linuxjournal.com/article.php?sid=5976

    Same guy, too.

  32. Check your assumptions by MarkusQ · · Score: 4, Funny

    Smitty825:
    I'll put my home directory on Sourceforge!

    Everyone can now help me maintain it!

    --

    Doh!

    AvantLegion:
    I patched your political science essay.

    I fixed all the anti-Bush bugs.

    --

    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

  33. Re:Comma Delimited??? by ScrewMaster · · Score: 2, Funny

    That's Lysdexia, I believe.

    --
    The higher the technology, the sharper that two-edged sword.
  34. rcsvi for easy sysadmining by negyvenot · · Score: 3, Interesting

    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:

    # alias vi=rcsvi
    # vi /etc/passwd
    [ remove Agent Smith's account ]
    :wq
    /etc/passwd: 12 lines, 94 characters.
    enter log message, terminated with single '.' or end of file:
    >> Agent Smith's account removed.
    .
    Voila. You now have your passwd file under revision control. More examples:
    # vi -r1.2 /etc/passwd
    # rlog /etc/passwd
    # rcsdiff -r1.2 -r1.3 /etc/passwd
    To make a complete backup of your system configuration:
    # tar fc /tmp/RCS.tar $(find / -type d -name RCS)
    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

  35. CVS for /etc by SCY.tSCc. · · Score: 2, Interesting

    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.

  36. Re:Not Innovative by Inflatable+Hippo · · Score: 2, Interesting

    > What's next? Keeping system configuration in CVS?

    Hey! I claim "prior art"!

    Seriously, I do this for entire binary installations including all configuration files for a custom server we've written.

    It's a really nice solution.

    One of the really great benefits is when someone has been footling some of the more complex configuration and broken things. It's really easy to find which files they've changed and what the changes are.

    Sure there's nothing you couldn't any other way but it it certainly makes lots of things easier.

    No doubt you could go further than we have with all sorts of fancy cron jobs to auto-update from a "trusted" branch nightly across your 5000 production servers but we only have 2 :-)