You are not logged in.
Pages: 1
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
You could try:
http://wiki.archlinux.org/index.php/Sync_laptop_desktop
Or a simpler solution:
http://wiki.archlinux.org/index.php/Rsync
Offline
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
I use unison to sync my desktop and laptop
http://www.cis.upenn.edu/~bcpierce/unison/
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
@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
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
Pages: 1