I have two roots, /sync
and ssh://bob@remotehost//sync
. These roots contain three subfolders: paul
, bob
and sam
. I currently sync them using the following script:
rsync -a --delete --delete-excluded --delete-after --force\
/sync/paul/ bob@remotehost:/sync/paul
rsync -a --delete --delete-excluded --delete-after --force\
bob@remotehost:/sync/bob/ /sync/bob
unison /sync/sam ssh://bob@remotehost//sync/sam
I want to create a unison profile that manages all three sub folders. So far I have the following:
# Define roots and paths
root = /sync
root = ssh://bob@remotehost//sync
path = paul
path = bob
path = sam
# Preserve timestamps
times = true
# Force single direction for some paths
forcepartial = Path paul/* -> /sync
forcepartial = Path bob/* -> ssh://bob@host//sync
Using this profile I expected all changes in /sync/paul
to be propagated to ssh://bob@remotehost//sync/paul
and all changes in /sync/paul
to be forcibly deleted. I also expected vice versa for the path bob
. However, this is not what I am seeing. In my test runs Unison wants to propagate new files and folders in both directions for both paths paul
and bob
.
How can I make Unison behave like rsync -a --delete --delete-excluded --delete-after --force $SOURCE/ $DEST
for the paths bob
and paul
?