How to RSYNC

The RSYNC command is an easy tool used to copy files from one location to another; locally or externally. The benefit of using RSYNC over the common copy command is that RSYNC can cut down the time necessary for moving files by predetermining what is already present on the destination and only copying over what isn’t already there.

There are a number of different methods to copying files over, however each method uses the same command.

Local

 
rsync -av --progress /path/to/source /path/to/destination

External

Push Method:

 
rsync -av --progress --rsh=â€ssh -p [SSH_Port] /path/to/sourceUSER@DESTINATION:/path/to/destination

 

Pull Method:


 
rsync -av --progress --rsh=â€ssh -p [SSH_Port] USER@SOURCE:/path/to/source /path/to/destination

 

Key:

  • USER – Username of remote account.
  • SOURCE – Source server’s IP address or hostname.
  • DESTINATION – Destination server’s IP address or hostname.
  • -av – Archive mode (equivalent to -rlptgoD) and Verbose (give you information about what files are being transferred and a brief summary at the end).
    • -rlptgoD = r (recursive), l (links, copy symlinks as symlinks), p (perms, preserve permissions), t (times, preserve times), g (group, preserve group), o (owner, preserve owner (root only)), D (devices, preserve devices (root only))
  • –progress – Shows progress of RSYNC.
  • –rsh – Specify the remote shell.
    • -p [SSH_Port] – Specify SSH port number. Replace [SSH_Port] with the actual port number.
  • 0 Корисниците го најдоа ова како корисно
Дали Ви помогна овој одговор?

Понудени резултати

Connect using Putty to a Linux Server

This article covers how to connect using Putty to a Linux Server. 1. If you haven't already,...

How to Create a Full cPanel Backup through SSH

This article will guide you on how to create a full cPanel backup through SSH. Note: The syntax...

Useful cPanel Scripts

This article covers some useful scripts built into cPanel! cPanel Update /scripts/upcp  This...

How to Set up Auto Login to PHPMyAdmin

How to Set up Auto Login to PHPMyAdmin    This article covers how to setup Auto Login to...

Fix Webalizer not Updating Problem in cPanel

Fix the Webalizer not Updating Problem in WHM/cPanel The Webalizer is a fast, free web...