You are not logged in.

#1 2010-04-17 03:15:52

Ryuujin
Member
Registered: 2009-07-04
Posts: 31

Configuration Sharing

Hello:

I currently have 2 computers:
- Laptop, Arch Linux 32bit, Pentium M 1.4Ghz, 1GB DDR2, 80GB HDD
- Desktop, Arch Linux 64bit, Q6600 2.4Ghz, 4GB DDR2, 320GB HDD

I want to share (most of) my configuration files between them. How would you suggest I tackle this (svn, mercurial, git, dropbox, rsync, etc)? Have you done something similar? Lessons learnt?

Stuff that would be nice (yes, I'm flexible):
- Excluding files from 'version control', for example: "my home folder (~/) except ~/Downloads and ~/Video" or "/etc/ except rc.conf "
- Excluding files based on rules "if ($file>1GB) exclude"
- 'Automatic' sync (something like 'svn update' on .bashlogin and .bashlogout will do)

Thanks for your input !

Offline

#2 2010-04-17 03:24:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Configuration Sharing

I used symlinks and dropbox to achieve this for a long time. I've sinced moved to mercurial, which suits my needs better - but I don't know if it allows you to set up rules as you have specified (but then I haven't looked into it).

Using mercurial, you would just out your excluded files in .hgignore (glob for flexibility). Dropbox would handle automatic synching, but I suspect that mercurial (or svn etc.,) would be more of a challenge.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2010-04-17 03:50:28

Ryuujin
Member
Registered: 2009-07-04
Posts: 31

Re: Configuration Sharing

@jasonwryan:

I've never used mercurial (or a distributed version control system for that matter), may I ask why do you prefer it (mercurial) over, for example, svn?

Do you have some kind of regex on your '.hgignore' to only include configuration files that you could share? (like '.dir' on home)

Would mercurial work well with non-text/code (pictures, videos, music)?

Offline

#4 2010-04-17 04:02:27

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Configuration Sharing

My systems are well set up now, and relatively stable. Using mercurial allows me to keep track of patches, and versions of configs at different times (dropbox has a history as well).

Yes - you only add the files that you wish to include in the repo. You can direct mercurial to ignore files or whole folders (mercurial doesn't strictly watch folders, but that is too much detail at this point).

I've only ever uploaded pictures (I have limited bandwidth, so the idea of sharing music or video is a little bit science-fiction for me...)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2010-04-17 16:16:29

alterecco
Member
Registered: 2009-07-13
Posts: 152

Re: Configuration Sharing

I have a directory where I put all my config files, structured from my root fs, and then I symlink the files to their place. This directory in turn can be rsynced/backed up or versioned as you wich.

As an example

/home/user/config
/home/user/config/etc/mpd.conf
/home/user/config/home/vimrc
....

It is not perfect, but it keeps things nicely separated

Last edited by alterecco (2010-04-17 16:16:51)

Offline

#6 2010-04-18 13:03:29

TheCox
Member
From: Orlando, FL
Registered: 2010-02-23
Posts: 34

Re: Configuration Sharing

You could use puppet, but that's probably overkill for two computers.

Offline

Board footer

Powered by FluxBB