Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Dec 312009

How to mirror a directory to a remote server over SSH?


You can use rsync command for this purpose

Assume you want to mirror the local folder "/home/john" to remote server, under the folder "/data/backup/", you need to use the following command

rsync -avuz -e ssh /home/john

If you want to dry-run the rsync, use the "n" flag, e.g.

rsync -avuzn -e ssh /home/john

For more options, checkout the rsync document:

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>