Unable to synchronize files












0















I am trying to synchronize files between two servers: server1 and server2
I created user and gave him rights to RWX on /var/www then I added the following unison configuration file..



root=//var/www/html/
root=ssh://user@server2//var/www/html/environments/simreg/


log = true

ignore=Path cache
ignore=Path vendor
ignore=Path logs

auto=true
batch=true
repeat=watch
#confirmbigdel=true
confirmbigdel=false
fastcheck=true
prefer=newer
silent=false
times=true
owner=true
server = true
confirmmerge = true

backupdir = /var/www/html/environments/backup
ui = text


But when ever i try to run unison, it is unable to create a backup.
The debug is not useful and I fail to realize what i am doing wrong.



user@server2:~$ unison -debug all
[startup] Preferences:
ui = text
host =
server = true
prefsdocs = false
doc =
version = false
silent = false
dumbtty = false
testserver = false
showprev = false
selftest = false
confirmmerge = true
retry = 0
repeat = watch
contactquietly = false
key =
label =
expert = false
height = 15
auto = true
maxthreads = 0
prefer = newer
force =
sortnewfirst = false
sortbysize = false
keeptempfilesaftermerge = false
diff = diff -u CURRENT2 CURRENT1
backupdir = /var/www/html/environments/backup
maxbackups = 2
backups = false
backupsuffix =
backupprefix = .bak.$VERSION.
backuploc = central
copymax = 1
copyquoterem = default
copythreshold = -1
copyprogrest = rsync --partial --append-verify --compress
copyprog = rsync --partial --inplace --compress
rsync = true
fastcheck = true
ignorelocks = false
dumparchives = false
ignorearchives = false
showarchive = false
rootsName =
fat = false
allHostsAreRunningWindows = false
someHostIsRunningWindows = false
ignore = Path logs
ignore = Path vendor
ignore = Path cache
confirmbigdel = false
batch = true
root = ssh://user@server2//var/www/html/
root = //var/www/html/
killserver = false
halfduplex = false
stream = true
addversionno = false
servercmd =
sshargs =
rshargs =
rshcmd = rsh
sshcmd = ssh
xferbycopying = true
sshversion =
ignoreinodenumbers = false
links-aux = true
links = default
times = true
group = false
owner = true
numericids = false
dontchmod = false
perms = 1023
rsrc-aux = false
rsrc = default
maxerrors = 1
unicodeCS = false
unicodeEnc = false
unicode = default
someHostIsInsensitive = false
ignorecase = default
timers = false
terse = false
logfile = /var/www/html/.unison/unison.log
log = true
debugtimes = false
debug = all
addprefsto =
Contacting server...
[remote] Shell connection: ssh (ssh, -l, dev_user, server2, -e, none, unison, -server)
user@server2's password:
[globals] Checking path '' for expansions
Connected [//serve1//var/www/html/ -> //server2//var/www/html/]
[startup] Roots:
//var/www/html/
ssh://user@server2//var/www/html/
i.e.
//var/www/html/
ssh://user@server2//var/www/html/
i.e. (in canonical order)
/var/www/html/
//server1//var/www/html/

[props] Setting permission mask to 1777 (1777 and 7777)
[stasher] initBackupsLocal
[stasher] d = /
[stasher] Prefix and suffix regexps for backup filenames have been updated
[server: stasher] initBackupsLocal
[server: stasher] d = /
[server: stasher] Prefix and suffix regexps for backup filenames have been updated
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...


above is the debug print.
but files are located on both server










share|improve this question

























  • At one point you say you want to synchronise files between two servers. At another you say you want to backup files (presumably from one server to the other). Which is it?

    – roaima
    Mar 8 '17 at 0:17











  • I am sorry for misleading the question. I am trying to achieve synchronizing files between two web servers. I have my artifacts between server1 and server2

    – Noel Alex Makumuli
    Mar 8 '17 at 7:07











  • A two-way synchronization (changes on server 1 are copied to server 2 AND changes in server 2 are copied to server 1)?

    – roaima
    Mar 8 '17 at 7:19













  • Artifacts are deployed on Server1 and then we need to copy them on Server2. The artifacts are deploy on using Jenkins

    – Noel Alex Makumuli
    Mar 8 '17 at 14:10
















0















I am trying to synchronize files between two servers: server1 and server2
I created user and gave him rights to RWX on /var/www then I added the following unison configuration file..



root=//var/www/html/
root=ssh://user@server2//var/www/html/environments/simreg/


log = true

ignore=Path cache
ignore=Path vendor
ignore=Path logs

auto=true
batch=true
repeat=watch
#confirmbigdel=true
confirmbigdel=false
fastcheck=true
prefer=newer
silent=false
times=true
owner=true
server = true
confirmmerge = true

backupdir = /var/www/html/environments/backup
ui = text


But when ever i try to run unison, it is unable to create a backup.
The debug is not useful and I fail to realize what i am doing wrong.



user@server2:~$ unison -debug all
[startup] Preferences:
ui = text
host =
server = true
prefsdocs = false
doc =
version = false
silent = false
dumbtty = false
testserver = false
showprev = false
selftest = false
confirmmerge = true
retry = 0
repeat = watch
contactquietly = false
key =
label =
expert = false
height = 15
auto = true
maxthreads = 0
prefer = newer
force =
sortnewfirst = false
sortbysize = false
keeptempfilesaftermerge = false
diff = diff -u CURRENT2 CURRENT1
backupdir = /var/www/html/environments/backup
maxbackups = 2
backups = false
backupsuffix =
backupprefix = .bak.$VERSION.
backuploc = central
copymax = 1
copyquoterem = default
copythreshold = -1
copyprogrest = rsync --partial --append-verify --compress
copyprog = rsync --partial --inplace --compress
rsync = true
fastcheck = true
ignorelocks = false
dumparchives = false
ignorearchives = false
showarchive = false
rootsName =
fat = false
allHostsAreRunningWindows = false
someHostIsRunningWindows = false
ignore = Path logs
ignore = Path vendor
ignore = Path cache
confirmbigdel = false
batch = true
root = ssh://user@server2//var/www/html/
root = //var/www/html/
killserver = false
halfduplex = false
stream = true
addversionno = false
servercmd =
sshargs =
rshargs =
rshcmd = rsh
sshcmd = ssh
xferbycopying = true
sshversion =
ignoreinodenumbers = false
links-aux = true
links = default
times = true
group = false
owner = true
numericids = false
dontchmod = false
perms = 1023
rsrc-aux = false
rsrc = default
maxerrors = 1
unicodeCS = false
unicodeEnc = false
unicode = default
someHostIsInsensitive = false
ignorecase = default
timers = false
terse = false
logfile = /var/www/html/.unison/unison.log
log = true
debugtimes = false
debug = all
addprefsto =
Contacting server...
[remote] Shell connection: ssh (ssh, -l, dev_user, server2, -e, none, unison, -server)
user@server2's password:
[globals] Checking path '' for expansions
Connected [//serve1//var/www/html/ -> //server2//var/www/html/]
[startup] Roots:
//var/www/html/
ssh://user@server2//var/www/html/
i.e.
//var/www/html/
ssh://user@server2//var/www/html/
i.e. (in canonical order)
/var/www/html/
//server1//var/www/html/

[props] Setting permission mask to 1777 (1777 and 7777)
[stasher] initBackupsLocal
[stasher] d = /
[stasher] Prefix and suffix regexps for backup filenames have been updated
[server: stasher] initBackupsLocal
[server: stasher] d = /
[server: stasher] Prefix and suffix regexps for backup filenames have been updated
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...


above is the debug print.
but files are located on both server










share|improve this question

























  • At one point you say you want to synchronise files between two servers. At another you say you want to backup files (presumably from one server to the other). Which is it?

    – roaima
    Mar 8 '17 at 0:17











  • I am sorry for misleading the question. I am trying to achieve synchronizing files between two web servers. I have my artifacts between server1 and server2

    – Noel Alex Makumuli
    Mar 8 '17 at 7:07











  • A two-way synchronization (changes on server 1 are copied to server 2 AND changes in server 2 are copied to server 1)?

    – roaima
    Mar 8 '17 at 7:19













  • Artifacts are deployed on Server1 and then we need to copy them on Server2. The artifacts are deploy on using Jenkins

    – Noel Alex Makumuli
    Mar 8 '17 at 14:10














0












0








0








I am trying to synchronize files between two servers: server1 and server2
I created user and gave him rights to RWX on /var/www then I added the following unison configuration file..



root=//var/www/html/
root=ssh://user@server2//var/www/html/environments/simreg/


log = true

ignore=Path cache
ignore=Path vendor
ignore=Path logs

auto=true
batch=true
repeat=watch
#confirmbigdel=true
confirmbigdel=false
fastcheck=true
prefer=newer
silent=false
times=true
owner=true
server = true
confirmmerge = true

backupdir = /var/www/html/environments/backup
ui = text


But when ever i try to run unison, it is unable to create a backup.
The debug is not useful and I fail to realize what i am doing wrong.



user@server2:~$ unison -debug all
[startup] Preferences:
ui = text
host =
server = true
prefsdocs = false
doc =
version = false
silent = false
dumbtty = false
testserver = false
showprev = false
selftest = false
confirmmerge = true
retry = 0
repeat = watch
contactquietly = false
key =
label =
expert = false
height = 15
auto = true
maxthreads = 0
prefer = newer
force =
sortnewfirst = false
sortbysize = false
keeptempfilesaftermerge = false
diff = diff -u CURRENT2 CURRENT1
backupdir = /var/www/html/environments/backup
maxbackups = 2
backups = false
backupsuffix =
backupprefix = .bak.$VERSION.
backuploc = central
copymax = 1
copyquoterem = default
copythreshold = -1
copyprogrest = rsync --partial --append-verify --compress
copyprog = rsync --partial --inplace --compress
rsync = true
fastcheck = true
ignorelocks = false
dumparchives = false
ignorearchives = false
showarchive = false
rootsName =
fat = false
allHostsAreRunningWindows = false
someHostIsRunningWindows = false
ignore = Path logs
ignore = Path vendor
ignore = Path cache
confirmbigdel = false
batch = true
root = ssh://user@server2//var/www/html/
root = //var/www/html/
killserver = false
halfduplex = false
stream = true
addversionno = false
servercmd =
sshargs =
rshargs =
rshcmd = rsh
sshcmd = ssh
xferbycopying = true
sshversion =
ignoreinodenumbers = false
links-aux = true
links = default
times = true
group = false
owner = true
numericids = false
dontchmod = false
perms = 1023
rsrc-aux = false
rsrc = default
maxerrors = 1
unicodeCS = false
unicodeEnc = false
unicode = default
someHostIsInsensitive = false
ignorecase = default
timers = false
terse = false
logfile = /var/www/html/.unison/unison.log
log = true
debugtimes = false
debug = all
addprefsto =
Contacting server...
[remote] Shell connection: ssh (ssh, -l, dev_user, server2, -e, none, unison, -server)
user@server2's password:
[globals] Checking path '' for expansions
Connected [//serve1//var/www/html/ -> //server2//var/www/html/]
[startup] Roots:
//var/www/html/
ssh://user@server2//var/www/html/
i.e.
//var/www/html/
ssh://user@server2//var/www/html/
i.e. (in canonical order)
/var/www/html/
//server1//var/www/html/

[props] Setting permission mask to 1777 (1777 and 7777)
[stasher] initBackupsLocal
[stasher] d = /
[stasher] Prefix and suffix regexps for backup filenames have been updated
[server: stasher] initBackupsLocal
[server: stasher] d = /
[server: stasher] Prefix and suffix regexps for backup filenames have been updated
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...


above is the debug print.
but files are located on both server










share|improve this question
















I am trying to synchronize files between two servers: server1 and server2
I created user and gave him rights to RWX on /var/www then I added the following unison configuration file..



root=//var/www/html/
root=ssh://user@server2//var/www/html/environments/simreg/


log = true

ignore=Path cache
ignore=Path vendor
ignore=Path logs

auto=true
batch=true
repeat=watch
#confirmbigdel=true
confirmbigdel=false
fastcheck=true
prefer=newer
silent=false
times=true
owner=true
server = true
confirmmerge = true

backupdir = /var/www/html/environments/backup
ui = text


But when ever i try to run unison, it is unable to create a backup.
The debug is not useful and I fail to realize what i am doing wrong.



user@server2:~$ unison -debug all
[startup] Preferences:
ui = text
host =
server = true
prefsdocs = false
doc =
version = false
silent = false
dumbtty = false
testserver = false
showprev = false
selftest = false
confirmmerge = true
retry = 0
repeat = watch
contactquietly = false
key =
label =
expert = false
height = 15
auto = true
maxthreads = 0
prefer = newer
force =
sortnewfirst = false
sortbysize = false
keeptempfilesaftermerge = false
diff = diff -u CURRENT2 CURRENT1
backupdir = /var/www/html/environments/backup
maxbackups = 2
backups = false
backupsuffix =
backupprefix = .bak.$VERSION.
backuploc = central
copymax = 1
copyquoterem = default
copythreshold = -1
copyprogrest = rsync --partial --append-verify --compress
copyprog = rsync --partial --inplace --compress
rsync = true
fastcheck = true
ignorelocks = false
dumparchives = false
ignorearchives = false
showarchive = false
rootsName =
fat = false
allHostsAreRunningWindows = false
someHostIsRunningWindows = false
ignore = Path logs
ignore = Path vendor
ignore = Path cache
confirmbigdel = false
batch = true
root = ssh://user@server2//var/www/html/
root = //var/www/html/
killserver = false
halfduplex = false
stream = true
addversionno = false
servercmd =
sshargs =
rshargs =
rshcmd = rsh
sshcmd = ssh
xferbycopying = true
sshversion =
ignoreinodenumbers = false
links-aux = true
links = default
times = true
group = false
owner = true
numericids = false
dontchmod = false
perms = 1023
rsrc-aux = false
rsrc = default
maxerrors = 1
unicodeCS = false
unicodeEnc = false
unicode = default
someHostIsInsensitive = false
ignorecase = default
timers = false
terse = false
logfile = /var/www/html/.unison/unison.log
log = true
debugtimes = false
debug = all
addprefsto =
Contacting server...
[remote] Shell connection: ssh (ssh, -l, dev_user, server2, -e, none, unison, -server)
user@server2's password:
[globals] Checking path '' for expansions
Connected [//serve1//var/www/html/ -> //server2//var/www/html/]
[startup] Roots:
//var/www/html/
ssh://user@server2//var/www/html/
i.e.
//var/www/html/
ssh://user@server2//var/www/html/
i.e. (in canonical order)
/var/www/html/
//server1//var/www/html/

[props] Setting permission mask to 1777 (1777 and 7777)
[stasher] initBackupsLocal
[stasher] d = /
[stasher] Prefix and suffix regexps for backup filenames have been updated
[server: stasher] initBackupsLocal
[server: stasher] d = /
[server: stasher] Prefix and suffix regexps for backup filenames have been updated
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...
[ui] Nothing changed: sleeping for 10 seconds...


above is the debug print.
but files are located on both server







unison






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 3 hours ago









Rui F Ribeiro

41.3k1481140




41.3k1481140










asked Mar 6 '17 at 8:02









Noel Alex MakumuliNoel Alex Makumuli

51210




51210













  • At one point you say you want to synchronise files between two servers. At another you say you want to backup files (presumably from one server to the other). Which is it?

    – roaima
    Mar 8 '17 at 0:17











  • I am sorry for misleading the question. I am trying to achieve synchronizing files between two web servers. I have my artifacts between server1 and server2

    – Noel Alex Makumuli
    Mar 8 '17 at 7:07











  • A two-way synchronization (changes on server 1 are copied to server 2 AND changes in server 2 are copied to server 1)?

    – roaima
    Mar 8 '17 at 7:19













  • Artifacts are deployed on Server1 and then we need to copy them on Server2. The artifacts are deploy on using Jenkins

    – Noel Alex Makumuli
    Mar 8 '17 at 14:10



















  • At one point you say you want to synchronise files between two servers. At another you say you want to backup files (presumably from one server to the other). Which is it?

    – roaima
    Mar 8 '17 at 0:17











  • I am sorry for misleading the question. I am trying to achieve synchronizing files between two web servers. I have my artifacts between server1 and server2

    – Noel Alex Makumuli
    Mar 8 '17 at 7:07











  • A two-way synchronization (changes on server 1 are copied to server 2 AND changes in server 2 are copied to server 1)?

    – roaima
    Mar 8 '17 at 7:19













  • Artifacts are deployed on Server1 and then we need to copy them on Server2. The artifacts are deploy on using Jenkins

    – Noel Alex Makumuli
    Mar 8 '17 at 14:10

















At one point you say you want to synchronise files between two servers. At another you say you want to backup files (presumably from one server to the other). Which is it?

– roaima
Mar 8 '17 at 0:17





At one point you say you want to synchronise files between two servers. At another you say you want to backup files (presumably from one server to the other). Which is it?

– roaima
Mar 8 '17 at 0:17













I am sorry for misleading the question. I am trying to achieve synchronizing files between two web servers. I have my artifacts between server1 and server2

– Noel Alex Makumuli
Mar 8 '17 at 7:07





I am sorry for misleading the question. I am trying to achieve synchronizing files between two web servers. I have my artifacts between server1 and server2

– Noel Alex Makumuli
Mar 8 '17 at 7:07













A two-way synchronization (changes on server 1 are copied to server 2 AND changes in server 2 are copied to server 1)?

– roaima
Mar 8 '17 at 7:19







A two-way synchronization (changes on server 1 are copied to server 2 AND changes in server 2 are copied to server 1)?

– roaima
Mar 8 '17 at 7:19















Artifacts are deployed on Server1 and then we need to copy them on Server2. The artifacts are deploy on using Jenkins

– Noel Alex Makumuli
Mar 8 '17 at 14:10





Artifacts are deployed on Server1 and then we need to copy them on Server2. The artifacts are deploy on using Jenkins

– Noel Alex Makumuli
Mar 8 '17 at 14:10










1 Answer
1






active

oldest

votes


















0














Your roots seem to be wrongly specified. The leading double slashes in your local path //var/www/html imply a reference a remote server var, which I am sure is not what you mean. Try these instead:



root=/var/www/html
root=ssh://user@server2/var/www/html/environments/simreg




Based on your comment, « Artifacts are deployed on Server1 and then we need to copy them on Server2. » I would suggest that unison is the wrong tool for the job. Instead consider using rsync, which provides a unidirectional copy:



rsync -av --progress /var/www/html/ user@server2:/var/www/html/environments/simreg/


If you want to test this without it actually copying any files, include --dry-run. If you are running it from a batch job (cron script, etc) remove the --progress flag.






share|improve this answer


























  • Hello, Thanks for the hint.. Though it is not the cause. When I run: $ unison.. it just prints [ui] Nothing changed: sleeping for 10 seconds... as mentioned before.. if I may ask, if i run unison, is it necessary to be as root(sudo) because my user is in sudo doers and www-data group.

    – Noel Alex Makumuli
    Mar 7 '17 at 21:34













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f349417%2funable-to-synchronize-files%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Your roots seem to be wrongly specified. The leading double slashes in your local path //var/www/html imply a reference a remote server var, which I am sure is not what you mean. Try these instead:



root=/var/www/html
root=ssh://user@server2/var/www/html/environments/simreg




Based on your comment, « Artifacts are deployed on Server1 and then we need to copy them on Server2. » I would suggest that unison is the wrong tool for the job. Instead consider using rsync, which provides a unidirectional copy:



rsync -av --progress /var/www/html/ user@server2:/var/www/html/environments/simreg/


If you want to test this without it actually copying any files, include --dry-run. If you are running it from a batch job (cron script, etc) remove the --progress flag.






share|improve this answer


























  • Hello, Thanks for the hint.. Though it is not the cause. When I run: $ unison.. it just prints [ui] Nothing changed: sleeping for 10 seconds... as mentioned before.. if I may ask, if i run unison, is it necessary to be as root(sudo) because my user is in sudo doers and www-data group.

    – Noel Alex Makumuli
    Mar 7 '17 at 21:34


















0














Your roots seem to be wrongly specified. The leading double slashes in your local path //var/www/html imply a reference a remote server var, which I am sure is not what you mean. Try these instead:



root=/var/www/html
root=ssh://user@server2/var/www/html/environments/simreg




Based on your comment, « Artifacts are deployed on Server1 and then we need to copy them on Server2. » I would suggest that unison is the wrong tool for the job. Instead consider using rsync, which provides a unidirectional copy:



rsync -av --progress /var/www/html/ user@server2:/var/www/html/environments/simreg/


If you want to test this without it actually copying any files, include --dry-run. If you are running it from a batch job (cron script, etc) remove the --progress flag.






share|improve this answer


























  • Hello, Thanks for the hint.. Though it is not the cause. When I run: $ unison.. it just prints [ui] Nothing changed: sleeping for 10 seconds... as mentioned before.. if I may ask, if i run unison, is it necessary to be as root(sudo) because my user is in sudo doers and www-data group.

    – Noel Alex Makumuli
    Mar 7 '17 at 21:34
















0












0








0







Your roots seem to be wrongly specified. The leading double slashes in your local path //var/www/html imply a reference a remote server var, which I am sure is not what you mean. Try these instead:



root=/var/www/html
root=ssh://user@server2/var/www/html/environments/simreg




Based on your comment, « Artifacts are deployed on Server1 and then we need to copy them on Server2. » I would suggest that unison is the wrong tool for the job. Instead consider using rsync, which provides a unidirectional copy:



rsync -av --progress /var/www/html/ user@server2:/var/www/html/environments/simreg/


If you want to test this without it actually copying any files, include --dry-run. If you are running it from a batch job (cron script, etc) remove the --progress flag.






share|improve this answer















Your roots seem to be wrongly specified. The leading double slashes in your local path //var/www/html imply a reference a remote server var, which I am sure is not what you mean. Try these instead:



root=/var/www/html
root=ssh://user@server2/var/www/html/environments/simreg




Based on your comment, « Artifacts are deployed on Server1 and then we need to copy them on Server2. » I would suggest that unison is the wrong tool for the job. Instead consider using rsync, which provides a unidirectional copy:



rsync -av --progress /var/www/html/ user@server2:/var/www/html/environments/simreg/


If you want to test this without it actually copying any files, include --dry-run. If you are running it from a batch job (cron script, etc) remove the --progress flag.







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 8 '17 at 15:56

























answered Mar 6 '17 at 22:02









roaimaroaima

45.5k757123




45.5k757123













  • Hello, Thanks for the hint.. Though it is not the cause. When I run: $ unison.. it just prints [ui] Nothing changed: sleeping for 10 seconds... as mentioned before.. if I may ask, if i run unison, is it necessary to be as root(sudo) because my user is in sudo doers and www-data group.

    – Noel Alex Makumuli
    Mar 7 '17 at 21:34





















  • Hello, Thanks for the hint.. Though it is not the cause. When I run: $ unison.. it just prints [ui] Nothing changed: sleeping for 10 seconds... as mentioned before.. if I may ask, if i run unison, is it necessary to be as root(sudo) because my user is in sudo doers and www-data group.

    – Noel Alex Makumuli
    Mar 7 '17 at 21:34



















Hello, Thanks for the hint.. Though it is not the cause. When I run: $ unison.. it just prints [ui] Nothing changed: sleeping for 10 seconds... as mentioned before.. if I may ask, if i run unison, is it necessary to be as root(sudo) because my user is in sudo doers and www-data group.

– Noel Alex Makumuli
Mar 7 '17 at 21:34







Hello, Thanks for the hint.. Though it is not the cause. When I run: $ unison.. it just prints [ui] Nothing changed: sleeping for 10 seconds... as mentioned before.. if I may ask, if i run unison, is it necessary to be as root(sudo) because my user is in sudo doers and www-data group.

– Noel Alex Makumuli
Mar 7 '17 at 21:34




















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f349417%2funable-to-synchronize-files%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

サソリ

広島県道265号伴広島線

Setup Asymptote in Texstudio