Chat with us, powered by LiveChat
Rsync

Rsync

Rsync is a powerful command that is used to synchronize and transfer files and directories. Rsync is widely used for mirroring Web sites. and transfers only the changes in files, using a clever rsync algorithm. This is a very useful method for backups as it is uses minimal bandwidth and it is also commonly used to keep clustered servers working together. The ending slashes are very important while using rsync. If you are not familiar with how it works simply make sure to have an ending slash on both the source and the destination and it should be fine.

The general form is:

rsync source destination

A few examples are:
rsync -vrplogDtH /old/usr/local/apache/conf /usr/local/apache

That will sync the /old/usr/local/apache/conf/ directory to the /usr/local/apache/conf/ directory on the same server. If you want to use rsync to go between servers then use the following:

rsync -ave ssh [email protected]:/backup/ /backup/

That will take the backup directory on 192.168.0.1 and copy it to the server the command is run from. The command will also accept a remote destination if you adjust the command line accordingly.

Latest posts by peter (see all)

Sharing

Leave your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.