You are not logged in.

#1 2010-08-02 07:58:29

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

multiple computers, one /home

I would like to keep synced my /home in multiple computers automagically.
I know I can use a network filesystem and keep only one home on server, but I would prefer not since I often use a notebook connected with a pay-per-byte contract.

So I'd prefere to sync at logon and at logoff.
Unfortunately I could not find a linux program to easily syncronize in both ways; any suggestion?

Thanks

Offline

#2 2010-08-02 08:00:44

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: multiple computers, one /home

Offline

#3 2010-08-02 08:00:56

Zeist
Arch Linux f@h Team Member
Registered: 2008-07-04
Posts: 532

Re: multiple computers, one /home

I like to keep configuration files and the like synced by keeping my home in version control (git in my case) which syncs to my home server. That also allows me to step back a revision if I broke something.

I do it manually to keep track of revisions properly, but this could be scripted to be run automatically.

Last edited by Zeist (2010-08-02 08:02:09)


I haven't lost my mind; I have a tape back-up somewhere.
Twitter

Offline

#4 2010-08-02 08:47:15

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: multiple computers, one /home

I use unison to sync my desktop and laptop
http://www.cis.upenn.edu/~bcpierce/unison/

Offline

#5 2010-08-02 08:48:45

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: multiple computers, one /home

@itsbrand212
Thanks. I read those articles.

@Zeist
I personally like fossil those days, but I looking for an automatic solution because it should work for my parents too :S

Edit:
@fukawi2
unison! that was the name that I trying to recall...

Last edited by ezzetabi (2010-08-02 08:49:40)

Offline

#6 2010-08-02 17:19:49

gazj
Member
From: /home/gazj -> /uk/cambs
Registered: 2007-02-09
Posts: 681
Website

Re: multiple computers, one /home

Unison+sshfs. 

I don't sync home tho.  I sync a folder called Documents in home.

2 reasons
1. My netbook's home is on a 4g sd card, so I can't have everything sync'ed
2. I don't want all my .dotfiles synced.  I.e my conky is different on my netbook to my desktop due to different resolutions.  I keep dotfiles that I do want synced in documents and symlink them to home on the relevent machines.

I also use unison over sshfs, these means I can sync away from home if I need to.  Handy to backup that important doc you have just done on your netbook.  I also can mount my Music and other stuff that will not fit on my netbook using sshfs.

I use the following scripts to manage connections and syncs

home

#!/bin/bash

#home
#Gazj 2010 garyjames82atgmaildotcom
#Laptop connect to server docs when at home

if [ -f /tmp/home ]; then
    echo "already home, try dis first"
    exit
else
    sshfs $USER@reddwarf:/srv/docs /mnt/docs
    rm $HOME/{Shared,Music,Videos}
    ln -s /mnt/docs/shared $HOME/Shared
    ln -s /mnt/docs/shared/Music $HOME/Music
    ln -s /mnt/docs/shared/Videos $HOME/Videos
    touch /tmp/home
    touch /tmp/connected
fi

away

#!/bin/bash

#Away
#Gazj 2010 garyjames82atgmaildotcom
#Laptop connect to server docs when away from home

if [ -f /tmp/away ]; then
    echo "already away, try dis first"
    exit
else
    sshfs $USER@www.foxjames.co.uk:/srv/docs /mnt/docs
    rm $HOME/{Shared,Music,Videos}
    ln -s /mnt/docs/shared $HOME/Shared
    ln -s /mnt/docs/shared/Music $HOME/Music
    ln -s /mnt/docs/shared/Videos $HOME/Videos
    touch /tmp/away
    touch /tmp/connected
fi

sync

#!/bin/bash

#sync
#Gazj 2010 garyjames82atgmaildotcom
#Sync laptop docs with server docs mounted at /mnt/docs, can be used either home or away. See home and away scripts

if [ -f /tmp/connected ] ; then

echo "Syncing home"
unison /mnt/docs/$USER /home/$USER/Documents -auto -batch -mountpoint .syncproof -logfile /dev/null -prefer /mnt/docs/$USER

echo "Sync Complete"

else
echo "Not connected try the home or away command"
fi

I also have some gui versions using zenity that I use on my gf's laptop, if needed.

Last edited by gazj (2010-08-02 17:20:21)

Offline

Board footer

Powered by FluxBB