LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-24-2010, 10:12 AM   #1
ratgod
Member
 
Registered: Jun 2004
Location: Niagara Falls, Canada
Distribution: Ubuntu
Posts: 30

Rep: Reputation: 15
how do I make unison transfer newer files during sync?


Hi There,
I have unison running on both my laptop and desktop, both use Ubuntu 10.04 (AMD64), I have my unison script set up to copy new files, but when it have 2 files already in place I have to manually tell it how to deal with it (either copy laptop->desktop or visa-versa). I would prefer to just run unison and click go, or possibly have an icon on the desktop I can click to automatically run it.

Does anyone know how to set it in the script file to copy the newest file over the older file, whether it be laptop -> desktop or desktop -> laptop?

I have it set up so I can do work on my desktop machine, then when I want to leave my desk to work elsewhere, I run unison on the laptop and synchronize my Firefox bookmarks, emails and schoolwork so I can continue from where I left off and when I get back I run unison again to synchronize all my changes back to the desktop.

many thanks
 
Old 05-24-2010, 11:23 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
I've only played with unison a little so far, so I'm not an expert, but I believe you just add "prefer=newer" to your script. There's also a "force=newer" option, and preferpartial/forcepartial for fine-tuning which files get copied which way, but to tell the truth I'm not completely clear on the differences between all these settings.

http://www.cis.upenn.edu/~bcpierce/u...ual.html#prefs

But be sure to read the manual carefully before following my advice please.
 
Old 05-24-2010, 02:18 PM   #3
ratgod
Member
 
Registered: Jun 2004
Location: Niagara Falls, Canada
Distribution: Ubuntu
Posts: 30

Original Poster
Rep: Reputation: 15
Thanks David, that did the trick.

I added times = true to allow it to propagate the time, then I added prefer = newer

I read the corresponding sections of the manual you linked me to for that info, it is much appreciated.

thanks again.

Peter M
 
  


Reply

Tags
unison



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I make Kubuntu (Hardy) keep newer modules compiled from source in the kernel? PTrenholme Ubuntu 4 06-26-2008 04:58 PM
Unison setup - or other file sync software m_a_b Linux - Software 1 06-15-2008 10:29 AM
Unison has found/created odd named files. I'm also after basic syncing advice. Mysticle31 Linux - Server 0 01-16-2008 11:50 AM
Make error with GTK+ (-> UNISON) JacquesMaeder Linux - Software 0 03-12-2006 11:44 AM
Just to make sure (slackware/newer versions) vexer Slackware 1 01-17-2003 03:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration