Two Way rsync via SSH

From D3xt3r01.tk
Revision as of 14:20, 30 December 2010 by Admin (talk | contribs) (Created page with '==WHY== Because I need to keep in sync some servers with the same content... ==HOW== 1) Password-less SSH Login 2) <source lang="bash"> rsync -e 'ssh -ax -p PORT -l USER…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

WHY

Because I need to keep in sync some servers with the same content...

HOW

1) Password-less SSH Login

2)

rsync -e 'ssh -ax -p PORT -l USER -i /path/to/rsync-key' -avzurP /path/to/source/ REMOTE_HOST:/path/to/destination/
rsync -e 'ssh -ax -p PORT -l USER -i /path/to/rsync-key' -avzurP REMOTE_HOST:/path/to/destination/ /path/to/source/