Thursday, September 20, 2007

rsync

I've just discovered the power of rsync, a Linux utility that allows you to synchronize files on different computers via SSH. This is exactly what I've been looking for because I need a safe and secure yet easily accessible way to store my files for my CPT S 560 class. Here's a quick summary of the command:


To download changes from a remote location -
rsync -ave ssh --delete user@server:folder path

To upload changes to a remote location -
rsync -ave ssh --delete folder user@server:path

The --delete option takes care of files that have been deleted from the source by also deleting them from the destination.

The folder argument specifies the source folder to be transferred. If this argument ends in a trailing slash (/), only the contents of the folder are copied. If there is no trailing slash, the folder is copied along with its contents.

The path argument is the destination to which the files are to be copied.

No comments: