Linux: one way remote sync using unison and ssh

#install unison sudo apt install unison # synchronizing from local folder "/home/user/sync/" with remote "ssh://" folder "/home/user/sync/" (ssh port 22000) unison -silent -auto -batch /home/user/sync/ ssh:// \ -nodeletion ssh:// \ -sshargs '-p22000' -logfile /tmp/mylog.txt
This procedure makes a file synchronization between local folder and remote ssh folder.


-silent: no messages
-auto: auto sync
-batch: no asking
-nodeletion <folder>: Avoid deletion of files at folder <folder> when synchronizing
-sshargs '-p22000': use 22000 as ssh port
-logfile: file for log output.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.