Managing your $HOME with Subversion

January 29, 2007 at 12:30 am 3 comments

I finally got around to using subversion on my home directories. (well, I got around to figuring out how to get started) Here’s how to get started:

Make a directory to store all the subversion database. (I used /home/svnroot) Next cd into that directory and run svnadmin create --fs-type fsfs $somedir. $somedir should be the same as the user’s home. Now su - to the user that is having their home subversioned. As that user cd to /home and run svn co file:///path/to/svnrepo

Now you can use normal svn commands to add files, or manage your home directory. You can do this on a home directory that already has files in it, which is a big plus 😉

Advertisements

Entry filed under: Linux. Tags: , , .

udev Rules Haiku: Open Source BeOS

3 Comments Add your own

  • 1. Michiel  |  January 29, 2007 at 2:00 am

    It does sound as a not to bad idea to do. However considering that /home/* is usually one position, having $HOME crash would mean and the end anyway. Wouldn’t it be better to the the SVN repository on preferably another disk or another machine entirely?

    Saying that I don’t nearly know enough about Subversion/SVN to make a statement if it is worth it, especially with huge $HOME’s

    What would you say the main advantages are of SVN or rather what made you switch over to SVN enabled homedirs?

    Reply
  • 2. dosnlinux  |  January 29, 2007 at 7:40 pm

    I usually store all of my Slackware install on a single partion, so If /home goes I have other problems too. 😦

    I never thought of that ever happening though, but I did plan on keeping an “active” copy of the SVN database synced up on an external hard drive along with daily dumps of the database on a separate partition of the external HD just in case. (only of the past week) I also want to have monthly backups made onto DVD’s

    I’ve had problems of duplicating data from “backups,” usually made before reformatting and never restored, so I’m reluctant about starting any backup plan unless I’m sure that it is done in a way that I won’t make the same mistakes again.

    Reply
  • 3. dosnlinux  |  January 29, 2007 at 7:52 pm

    … and to answer your second question about why I switched to SVN dirs was mainly to make comparing backups easier. (I can just compare revision numbers instead of having to do diffs of files if I forget how old a backup is) It’s also nice because I only have to worry about backing up the SVN directory instead of individual directories.

    As an added bonus it makes my $HOME dirs a little more portable. I can check out my home on another computer or partition (even as a different user) and keep the two $HOMES synced easier.

    Reply

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

Trackback this post  |  Subscribe to the comments via RSS Feed


Feeds


%d bloggers like this: