LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-15-2008, 11:00 PM   #1
jlacroix
Member
 
Registered: Nov 2003
Posts: 187

Rep: Reputation: 15
Help Needed With Unison And Symbolic Links


I have set up Unison to sync my Desktop and Laptop. It's working fine, except for one problem.

On my desktop, I dual boot Windows XP (because I am stuck with a Zune) and Ubuntu. My music files are all on my XP side for my Zune. On my Linux side, I have a symbolic link that points to the music files on my Windows side so that both my Ubuntu and Windows sides both have the exact same Music files.

On my laptop, it's Ubuntu only, no symbolic links.

The problem:
Today I set up Unison to synchronize my Ubuntu music files too. I haven't ran Unison to sync my music files yet. When I previewed the changes, it wants to create the symbolic link from my Desktop to my laptop. I do not want this. I want my /home/jeremy/Music folder to be treated as a directory in Unison so it syncs my files, not a symbolic link.

Here is the configuration file I am using for Unison:

Code:
### ROOT SYNC PATHS ###
 
# first root is my home directory on this laptop
root = /home/jeremy/
 
# second directory is my desktop's home folder over SSH
root = ssh://jeremy@**IP ADDRESS HIDDEN**//home/jeremy/
 
### PATHS TO SYNCHRONIZE ###
 
# gaim/pidgin IM client logs and settings
path = .purple/

# Personal folders
path = Shared/
path = Pictures/
path = Videos/
path = Music/
path = Documents/
path = Roms/
path = .zsnes/
path = Themes/
 
### IGNORE RULES ###
 
# ignore archived backups
#ignore = Path websites/archive/*
I hope I explained it good enough. In summary, my Ubuntu music folder is a symbolic link to C:/Documents and settings/jeremy/My Music on my Windows side, but I don't want it to be seen as a symbolic link to Unison.

Thanks!
 
Old 07-16-2008, 02:47 AM   #2
jlacroix
Member
 
Registered: Nov 2003
Posts: 187

Original Poster
Rep: Reputation: 15
Anyone?

 
Old 07-16-2008, 08:59 PM   #3
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 51
I've taken a slightly different approach. I mount my laptop folder on my desktop and then use unison to synchronize my desktop folder with the mounted laptop folder. The unison configuration thinks it's syncing two local folders.
 
Old 07-16-2008, 09:20 PM   #4
jlacroix
Member
 
Registered: Nov 2003
Posts: 187

Original Poster
Rep: Reputation: 15
Well I found some info, although this is still not solved.

Apparently this section of the Unison manual deals with what I'm up against:

Quote:
Ordinarily, Unison treats symbolic links in Unix replicas as “opaque”: it considers the contents of the link to be just the string specifying where the link points, and it will propagate changes in this string to the other replica.

It is sometimes useful to treat a symbolic link “transparently,” acting as though whatever it points to were physically in the replica at the point where the symbolic link appears. To tell Unison to treat a link in this manner, add a line of the form

follow = pathspec

to the profile, where pathspec is a path pattern as described in the Path Patterns section.
However, that makes absolutely no sense to me. Where am I supposed to put "follow = pathspec" and what the heck is a pathspec? I tried a ton of things, for example "follow = /home/jeremy/Music" and nothing works at all.

Hopefully one of you can read the quoted part of the manual above and translate it to me so I know where to put that and what to put for pathspec.
 
Old 07-17-2008, 12:05 AM   #5
jlacroix
Member
 
Registered: Nov 2003
Posts: 187

Original Poster
Rep: Reputation: 15
I think I figured it out. I'll repost if not.
 
Old 10-30-2011, 07:06 AM   #6
wkretzsch
LQ Newbie
 
Registered: Oct 2011
Posts: 1

Rep: Reputation: Disabled
For posterity

Just so everybody else knows who comes across these posts:

From what I've gathered, the correct syntax for solving this problem in a unix bash shell would be:

Code:
unison -follow 'Path mysymlink/Path'
 
  


Reply



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
Symbolic Links suavecu Linux - Software 1 01-11-2006 10:04 PM
Symbolic Links Greg_courageous Linux - Newbie 1 05-10-2004 07:05 AM
Symbolic links? TongueTied Linux - Newbie 3 08-27-2003 06:00 AM
Symbolic links bkmesenbrink Linux - Newbie 2 11-13-2002 11:54 AM
Symbolic links Valerie Linux - Newbie 12 03-31-2002 01:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 04:11 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