Tips and Tricks

How to transfer files-folder by rsync

rsync is an open source utility that provides fast incremental file transfer. rsync is freely available under the GNU General Public License and is currently being maintained by Wayne Davison.

rsync is a file transfer program for Unix systems. rsync uses the “rsync algorithm” which provides a very fast method for bringing remote files into sync. It does this by sending just the differences in the files across the link, without requiring that both sets of files are present at one of the ends of the link beforehand.

rsync -rt /home/transfer_me [email protected]:/home

The switches breakdown as follows:

  • -avvz = archive, verbose x 2, compress
  • –times = preserve modification times
  • –stats = give some file-transfer stats
  • –checksum = skip based on checksum, not mod-time & size
  • –human-readable = output numbers in a human-readable format
  • –acls = preserve ACLs (implies -p)
  • –itemize-changes = output a change-summary for all updates
  • –progress = show progress during transfer
  • –out-format='[%t] [%i] (Last Modified: %M) (bytes: %-10l) %-100n’
    • %t = current date time
    • %i = an itemized list of what is being updated
    • %M = the last-modified time of the file
    • %-10l = the length of the file in bytes (-10 is for alignment and precision)
    • %-100n = the filename (short form; trailing “/” on dir) (-100 is for alignment and precision)

NOTE: See the man pages for rsync and rsyncd.conf for full details on the above switches.

By Murshid Alam

Organizer of Barishal WordPress Meetup, WordPress Enthusiastic and, Open Source Lover. Over the last few years, I learned web programming and worked with them locally. I also assist in designing, developing and testing websites too!

Before coming to web programming I was mostly involved with Electric Media(Channel i), Newspaper (Priyo, Bhorer Kagoj) and volunteering activities (including NGOs).

I love to contribute to the WordPress Community. I am always happy to meet new peoples in the WordPress community and see how I can help them achieve their goals. When I am not online and WordPress, I love to play football, travel, riding the bike and attend Meetup/WordCamps!

If you’d like, you can help me to attend WordCamps around the World.

Leave a Reply