Using rsync to Synchronize Files between a Local and Remote File System, via SSH

Category: Software and Systems Engineering
Author: Sean O'Donnell
Thu, Feb. 20th, 2003 @ 2:20:22 (MST)

This example shows a basic approach to using the 'rsync' application to synchronize a file/directory between a Local and Remote File System

Synchronize a file/directory TO a remote machine via SSH...

rsync -rave ssh /files/to/use user@remote.server.example.net:22/files/to/update

The command example above will connect to 'remote.server.example.net', via SSH, on port 22, as 'user'.

Once connected, you will be prompted for a password.

After you have been successfully authenticated via SSH, rsync will begin to index and compare the '/files/to/use' file/directory FROM the LOCAL file system, and save the TO the '/files/to/update' file/directory on the REMOTE file system.

Synchronize a file/directory FROM a remote machine via SSH...

rsync -rave ssh user@remote.server.example.net:22/files/to/use /files/to/update

The command example above will connect to 'remote.server.example.net', via SSH, on port 22, as 'user'.

Once connected, you will be prompted for a password.

After you have been successfully authenticated via SSH, rsync will begin to index and compare the '/files/to/use' file/directory FROM the REMOTE file system, and save the TO the '/files/to/update' file/directory on the LOCAL file system.

Copyleft (<) 1998-2019 www.seanodonnell.com