Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Struggling with unison [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
sgtrock
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2003
Posts: 87

PostPosted: Tue Aug 01, 2006 2:01 pm    Post subject: Struggling with unison [SOLVED] Reply with quote

The unison mailing list did turn up an answer. Below, you'll note that I used
Quote:
-force newer


as part of the calling command. This is what was forcing the copying of the deleted files. What I should have been using was
Quote:
-prefer newer


Using that instead provides the behavior that I want. We now return you to your regularly scheduled thread. :)

====================================
I originally posted this in Desktop, but didn't get any response. I guess I put it in the wrong place. :oops: Hoping someone here has some idea of what I can do to resolve the problem:

=============================
OK, call me dense. I've been through the documentation a dozen times and I'm still not getting things to work properly. :( As the home page seems to be most kindly described as static, I'm hoping someone following this board might be able to tell me what stupid configuration mistake I've made. :oops:

I currently have two P4 systems that are shared between 6 people. There are two adults (one part time) and four kids (one part time). I'm syncing up the home directory between them. I hope to add a third amd64 PC to relieve some of the pressure for resources. However, before I do, I have to figure out how I managed to screw up automated file deletion. Right now, existing and new files are updated properly. Deleted files have to be manually deleted on each PC.

Anyhow, I have unison running from a root owned cron job on one:
Quote:

5 2 * * * /usr/bin/nice --adjustment=19 /usr/bin/unison -ui text -batch -force newer -times jps-home.prf

The top part of jps-home.prf looks like this:
Quote:

#
# Include the common variables
#
include common

#
# Set the variables necessary for running in batch mode
# force = newer
# times = true
owner = true
group = true
silent = true
#
# Set the Ignore variables for the home directories
#
....


common looks like this:
Quote:

# UI variables
contactquietly = true
auto = true

# Diff
diff = diff -y -W 79 --suppress-common-lines

# Ignore variables
...
# log actions to the terminal
log = true


Can anyone see what I did wrong?


Last edited by sgtrock on Sun Aug 06, 2006 3:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
chrismortimore
l33t
l33t


Joined: 03 Dec 2005
Posts: 721
Location: Edinburgh, UK

PostPosted: Tue Aug 01, 2006 2:47 pm    Post subject: Reply with quote

Post the whole jps-home.prf file, the top half isn't much use ;)
_________________
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB 7200rpm Maxtor DiamondMax 10, 2x320GB WD 7200rpm Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB
Back to top
View user's profile Send private message
sgtrock
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2003
Posts: 87

PostPosted: Tue Aug 01, 2006 5:50 pm    Post subject: Reply with quote

OK, although I don't see how it would help much. The rest of it is just IGNORE variables. I assume that you'll want to see the rest of 'common' as well?
Back to top
View user's profile Send private message
chrismortimore
l33t
l33t


Joined: 03 Dec 2005
Posts: 721
Location: Edinburgh, UK

PostPosted: Tue Aug 01, 2006 6:27 pm    Post subject: Reply with quote

So all it has left out is the IGNORE variables? Then perhaps it doesn't work because you didn't set any roots. This is my sync profile if it's any help, and the contents of the directory it syncs:
Code:
[1][chris@toaster:~]$ cat .unison/sync.prf
# Roots
root = /home/chris/unison
root = ssh://chris@marbles//home/chris/unison
# Follow symlinks and hidden symlinks
follow = Path *
follow = Path .*
[1][chris@toaster:~]$ ls -l unison
total 0
lrwxrwxrwx 1 chris users 54 2006-07-17 11:11 amsn-logs -> /home/chris/.amsn/chris_mortimore_googlemail_com/logs/
lrwxrwxrwx 1 chris users 22 2006-07-17 11:11 documents -> /home/chris/documents/
lrwxrwxrwx 1 chris users 13 2006-07-23 16:52 downloads -> ../downloads/
lrwxrwxrwx 1 chris users 24 2006-07-22 15:04 fish-fillets -> /home/chris/.fillets-ng/
lrwxrwxrwx 1 chris users 17 2006-07-17 11:11 games -> /home/chris/games
lrwxrwxrwx 1 chris users 46 2006-07-17 11:11 googlemail-dilbert -> /home/chris/.maildir/.Google Mail.Dilbert/cur/
lrwxrwxrwx 1 chris users 38 2006-07-17 11:11 googlemail-inbox -> /home/chris/.maildir/.Google Mail/cur/
lrwxrwxrwx 1 chris users 43 2006-07-17 11:11 googlemail-sent -> /home/chris/.maildir/.Google Mail.Sent/cur/
lrwxrwxrwx 1 chris users 23 2006-07-28 10:52 neverball -> /home/chris/.neverball/
lrwxrwxrwx 1 chris users 17 2006-07-17 11:11 phone -> /home/chris/phone
lrwxrwxrwx 1 chris users 18 2006-07-17 11:11 zsnes -> /home/chris/.zsnes
[1][chris@toaster:~]$

_________________
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB 7200rpm Maxtor DiamondMax 10, 2x320GB WD 7200rpm Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB
Back to top
View user's profile Send private message
sgtrock
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2003
Posts: 87

PostPosted: Tue Aug 01, 2006 11:03 pm    Post subject: Reply with quote

Oops, you're right. I missed the top couple of lines of the file. Here's the whole thing:
Quote:
sgtrock .unison # cat jps-home.prf
root = /home
root = ssh://jps//home

#
# Include the common variables
#
include common

#
# Set the variables necessary for running in batch mode
# force = newer
# times = true
owner = true
group = true
silent = true
#
# Set the Ignore variables for the home directories
#
ignore = Name .DCOP*
ignore = Name .dcop*
ignore = Name .Xauthority
ignore = Name .*history
ignore = Name */.mcop/random-seed
ignore = Name .mcop/random-seed
ignore = Name .xsession-er*
ignore = Name .ICEauthority
ignore = Name .font-cache*
ignore = Name *.ini
ignore = Path .mozilla/*/*/Cache
ignore = Path */.mozilla/*/*/Cache
ignore = Path .mozilla/*/*/*dat
ignore = Path */.mozilla/*/*/*dat
ignore = Path .point2play
ignore = Path */.point2play
ignore = Path .transgaming
ignore = Path */.transgaming
ignore = Path cod
ignore = Path */cod
ignore = Path */Desktop
ignore = Path lan
ignore = Path {josh/.gnome-system-monitor.josh}
Back to top
View user's profile Send private message
chrismortimore
l33t
l33t


Joined: 03 Dec 2005
Posts: 721
Location: Edinburgh, UK

PostPosted: Wed Aug 02, 2006 12:02 am    Post subject: Reply with quote

Hmm... Run /usr/bin/unison -ui text -batch -force newer -times jps-home.prf from a terminal and post the output.
_________________
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB 7200rpm Maxtor DiamondMax 10, 2x320GB WD 7200rpm Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB
Back to top
View user's profile Send private message
sgtrock
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2003
Posts: 87

PostPosted: Wed Aug 02, 2006 1:43 am    Post subject: Reply with quote

OK, after commenting out the "silent=true" statement from jps-home.prf, here's the output:

Quote:
sgtrock ~ # rm /home/jim/sgtrock-a.txt
sgtrock ~ # /usr/bin/unison -ui text -batch -force newer -times jps-home.prf > jps-output2.txt
Looking for changes
betsi/.cedega/.default_configuration_profiles/config.cedega_3.2
betsi/.kde3.4/share/apps/RecentDocuments/josh.sxi.desktop
betsi/.mozilla/firefox
betsi/DropTeam/data/120mmHE.physicalobjectgroup
dani/.gaim/icons/78f22ef8
dani/.gstreamer-0.8
dani/.local/share/Trash/files/Lizzie_icon_02.jpg
dani/.ut2004/Cache/E077E83F48DB3CFEF0548E8D0931BE72-1.uxx
jim/.cedega/Civilization IV/c_drive/Games/Firaxis/CivilizationIV/Assets/Art/Movies/Wonders/AngkorWat.bik
jim/.cedega/Civilization IV/c_drive/Games/Firaxis/CivilizationIV/Assets/Sounds/Soundtrack/Medieval/BrumelGloria.mp3
jim/.cedega/Civilization IV/c_drive/Games/Firaxis/CivilizationIV/Assets/Sounds/Units/WarChariotEnd-001.wav
jim/.cedega/Civilization IV/c_drive/My Documents/My Games/CivilizationIV/Saves/single/jim BC-0620.Civ4SavedGame
jim/.cedega/Half-Life 2/c_drive/Games/Sierra/Half-Life/cstrike/sprites/radio.spr
jim/.cedega/Half-Life 2/c_drive/Games/Sierra/Half-Life/ricochet/gfx/shell/head_load.bmp
jim/.cedega/hl.exe/c_drive/Games/SIERRA/Half-Life/cstrike/sound/ambience/dog7.wav
jim/.cedega/hl.exe/c_drive/Games/SIERRA/Half-Life/dod/sound/weapons/mortarhit.wav
jim/.cedega/hl.exe/c_drive/Games/SIERRA/Half-Life/ricochet/sound/pspawn.wav
jim/.ee/minis/home/jim/News/Pan/68CQ4290.jpg
jim/.gnome2/apps-mdk/Applications/Communications/KFax.desktop
jim/.kde3.4/.kde3.2/share/config/rorschachrc
jim/.kde3.5/.kde3.2/share/config/atlantik.eventsrc
jim/.lgp/maj_demo/data
jim/.phoenix/default/3vkjhsia.slt/Cache/003FDA36d01
jim/Dev/diveintopython-5.4/py/plural.py
jim/DevProjects/webmin-modules/bfv/bfv-webmin.webprj
jim/equakecl/bonuses/tricks/dm4_mega_escape.qwz
jim/evolution/mail/imap/jim.smilanich@iphouse.com@imap.iphouse.com/folders/INBOX/subfolders/Lists-and-Boards
josh/.Trash/.kde/share/apps/nsplugins
josh/.gnome-desktop/josh's Home
josh/.kde3.4/.kde3.2/share/apps/kicker/mozilla.desktop
josh/.kde3.4/share/config/session/kwallet_10e2cadf72000111232370000000022020019_1128227816_120847
josh/.openoffice/1.1.4/user/config/standard.soh
josh/.ut2004/Cache/7755046640B90994BEF3E08704D68C0E-1.uxx
josh/RealPlayer/share/locale/hi/README
josh/kde-org/share/apps/konqueror/dirtree/remote/web/mdkbizcase_web.desktop
katie/.gaim/logs/aim/ohohxcassie/.system/2005-12-17.150455.txt
katie/.thunderbird/tpccus6e.default/compreg.dat
kristi/.kde3.4/share/config/session/kwin_10e2cadf72000111601669900000127050000_1131493958_436413
Waiting for changes from server
Reconciling changes
Propagating updates


UNISON started propagating changes at 20:34:15 on 01 Aug 2006
[BGN] Copying jim/sgtrock-a.txt
from //jps//home
to /home
[END] Copying jim/sgtrock-a.txt
UNISON finished propagating changes at 20:34:15 on 01 Aug 2006


Saving synchronizer state
Synchronization complete (1 item transferred, 0 skipped, 0 failures)


A test deletion from sgtrock-a.txt from jps will also get it copied across.

Any thoughts?
Back to top
View user's profile Send private message
chrismortimore
l33t
l33t


Joined: 03 Dec 2005
Posts: 721
Location: Edinburgh, UK

PostPosted: Wed Aug 02, 2006 9:59 am    Post subject: Reply with quote

Ok, so at least unison is doing it's job. What cron are you running?
_________________
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB 7200rpm Maxtor DiamondMax 10, 2x320GB WD 7200rpm Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB
Back to top
View user's profile Send private message
sgtrock
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2003
Posts: 87

PostPosted: Wed Aug 02, 2006 3:13 pm    Post subject: Reply with quote

Actually, the issue isn't cron at all. unison is not doing its job. I was showing the failing case where a file that I delete from one system is not deleted from the other. Instead, the deleted file is copied back from the other system.

That is incorrect behavior for true file and directory syncronization.

I had it working at one point. I'm not sure when or why it quit. I'm about 70% sure that I did it, but I couldn't swear to it. :oops:

Any thoughts? questions? rotten eggs? :wink:
Back to top
View user's profile Send private message
chrismortimore
l33t
l33t


Joined: 03 Dec 2005
Posts: 721
Location: Edinburgh, UK

PostPosted: Wed Aug 02, 2006 3:58 pm    Post subject: Reply with quote

sgtrock wrote:
Actually, the issue isn't cron at all. unison is not doing its job. I was showing the failing case where a file that I delete from one system is not deleted from the other. Instead, the deleted file is copied back from the other system.
...
Any thoughts? questions? rotten eggs? :wink:
Given I missed that, I'd say ignore me ;) I suppose the obvious answer is compare your configs with your backups, because of course you have backups, don't you? ;)
_________________
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB 7200rpm Maxtor DiamondMax 10, 2x320GB WD 7200rpm Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB
Back to top
View user's profile Send private message
sgtrock
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2003
Posts: 87

PostPosted: Wed Aug 02, 2006 4:42 pm    Post subject: Reply with quote

These are low impact, home use only machines. My only real need for backup is to recover from a disk failure. I'm not at all worried about having to find old files. So, I overwrite my backups every night. The drawback, of course, is that I have no history. Normally it's not a big deal, but right now it clearly is.

(sigh) Looks like I'm going to have to join the unison mailing list. Maybe someone there has an idea.

Thanks for the help, though. I appreciate it when people do try to resolve stuff. :)
Back to top
View user's profile Send private message
chrismortimore
l33t
l33t


Joined: 03 Dec 2005
Posts: 721
Location: Edinburgh, UK

PostPosted: Wed Aug 02, 2006 4:46 pm    Post subject: Reply with quote

Sorry I can't help any more. If I think of something though, I'll let you know. Good luck :)
_________________
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB 7200rpm Maxtor DiamondMax 10, 2x320GB WD 7200rpm Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum