# Is there a way to sync my laptop with my desktop?

## ZennouRyuu

This is somthing that has had me puzzled since I got my laptop into a working condition with Gentoo. I'm not at home all the time and when I am gone i would like to be able to get my E-mail and work on some programming projects,  website design, graphic design or maybe somthing else, all from my laptop. The problem is once I return home to my main PC i have no way to intelligently sync my new mail/work with that of my main PC. Right now my solution is to manually do this over my home network, but this is a tedious and time consuming process to go through, I must remember what I have changed, and what new E-mail i have recieved and then to send it.

I need a conveniant application to use to keep my two machines in sync with eachother.

Thank You,

--ZennouRyuu

----------

## compu-tom

I heard of "unison" (emerge net-misc/unison) but never tried it. Is this what you are looking for?

----------

## Ansorg

 *compu-tom wrote:*   

> I heard of "unison" (emerge net-misc/unison) but never tried it. Is this what you are looking for?

 

that's what I use in the same situation.

Have the desktop as NFS server, mount the "desktop"/home/jens on the notebook and then let unison sync the /mnt/home/jens with the /home/jens

did not find an easier solution so far

----------

## ZennouRyuu

I am merging Unison as i type this, I hope it works out, thank you both for your prompt replies.

----------

## Zugot

You could set up IMAP on your desktop if you have that kind of connection to the Internet, and you could use CVS for your programming/web design stuff.  As an added bonus with CVS, you'll get versioning support too.

----------

## acepoint

 *ZennouRyuu wrote:*   

> 
> 
> I need a conveniant application to use to keep my two machines in sync with eachother.
> 
> Thank You,
> ...

 

What about the simple rsync? I also work at home and with my notebook. Everytime I leave home or come back I use rsync to sync my mailfolder, my letters, other working stuff ...

Ciao

acepoint

----------

## psp

you could be a little more 'hard-core" and use the intermezzo filesystem.

----------

## zojas

I use rsync  a lot, but it's a mirroring tool. which means if you delete some emails out of your maildir then rsync in both directions your deleted messages will come back. so it works great as long as you are just changing/adding files (which is the common case)

----------

## ZennouRyuu

I felt it my place to return to post the solution I have found. Going by the first two responses here i decided to give the application "Unison" a try, I must say that I am greatly pleased by it. Its easy to set up and install easy to use and it is a very "smart" application in that it has the sense to ask me when it is not sure what to do, this makes for fewer mistakes (even if it requires a bit more work from me).  

Overall a great solution for syncing two networked systems together.

Thank You to all that posted--

--ZennouRyuu

----------

## thing_q3

Intermezzo and Coda look pretty interesting, as does OpenAFS. Does anyone have any experience using any of these, especially in a mobile environment? They sound very promising, but i wonder how they perform in real life. Also, how do they compare with eachother? Anyway, just curious...

----------

## vod

honestly: I would use rsync.

You are only using one computer at a time so you wont have to rsync in both directions.

When you use your desktop and are about to go on a trip with your laptop, rsync to the desktop from the laptop.

When you've used your laptop and came back, rsync from your desktop to your laptop.  :Smile: 

----------

## Reformist

Well I may be an idiot and may have reinvented the wheel, but I spent a night and some time writing a bash script that runs through some target directories (basically specific folders on my 'desktop', such as programming items, graphic webwork, text files etc.) and checks to see if each file exists on each machine and which is newer, and copies if need be.

The advantage of doing it this way is that 1) I wrote it so I understand how it works, and 2) I can list specific directories that I want synched regularly (whenever I run the script) so that I can mess around with something on one computer and not have it affect the other computer. Unfortunately the laptop has files that pertain to itself only, and my desktop has files that pertain to the desktop only, and I don't want them mixed, so I'm not sure how easy it would be to take that into consideration with one of the other syncing utilities, not that I have much experience with any of them.

Oh, one more thing. Possibly the biggest advantage of writing a bash script is that it will work from linux to any OS. My desktop is linux and my laptop is unfortunately XP at the moment, but everything syncs just fine, and I don't have to worry about either system's directory structures or system layout - just the folders in question on my desktop(s). That is just my experience, and I'm very happy with how things run currently. I suck at bash scripting, but I can post / send the script I'm using (about 2.5 pages) if anyone wants to look at it. Basic things like for loops with the find command's output. 

In terms of speed and ease of use, once it's written, a bash script is very easy to configure. List which directories to sync in one of the variables, each machine's desktop path, and then just run the script. It's tasks like this that make me love linux.

----------

## Reformist

Sorry to revive a dead thread, but, unison owns!! Use it!

----------

## Motomouse

I also use unison to sync my gentoo desktop with my ibook (gentoo and osx). I had an additional problem with the german umlaute (ü,ä,ö) and was not able to solve it. (the different utf8 encoding caused troubles)

To avoid these problems I renamed my files with this simple script.

(executed in a directory it renames all files including the subdirectorys)

```
#!/bin/bash

find . -name "*ä*" -exec rename ä ae '{}' \;

find . -name "*ü*" -exec rename ü ue '{}' \;

find . -name "*ö*" -exec rename ö oe '{}' \;

find . -name "*Ä*" -exec rename Ä AE '{}' \;

find . -name "*Ü*" -exec rename Ü UE '{}' \;

find . -name "*Ö*" -exec rename Ö OE '{}' \;

```

----------

## Roses.Are.Green

hii

thanks gentoo for helping me a lot.i am really membranous for your help.what ever my problem was,u have solved every thing.I had an additional problem with the English umlaut (ü,ä,ö) and was not able to solve it.please solve my problem,than i will be great full to u.thanks again for helping me previously and i wish u will help me again.  :Smile:   :Smile: 

----------

