How to backup/copy/synchronise a full folder lying on a remote server, onto another (local/remote) machine easily using rsync in linux
https://www.zyxware.com/sites/default/files/styles/user_image/public/default_images/index.png?itok=2YmREnrP
BY sandeep.sasikumar
7 years ago
Technical-Solution
0 comments comment

”rsync” is an open source utility in Linux/Unix primarily used for synchronising files/directories over the networks. You can also use it to backup/copy folders between machines. It is particularly made use of to while administering servers connected to the internet. The term “rsync” itself refers to “remote-synchronise”.

Rsync has got a number of options to control the file synchronisation operation and is a very much flexible command line utility. Rsync finds files that are to be transferred using a quick check algorithm, identifying changed files by their size or their last modified time.

While transferring data over the internet it is recommended that you use rsync over SSH as it allows a secure remote connection. The most popular rsync command option combinations are

  1. rsync --delete : delete the files that is not present on the sender's system
  2. rsync -v : Verbose (which gives detailed information)
  3. rsync -e : specify the ssh as remote shell
  4. rsync -z : compress file data
  5. rsync -r : recurse into directories
  6. rsync -a : archive mode

Examples: Consider you want to copy the file backup.tar.gz to a server named example.server1.com The following command:

rsync -v -e ssh /home/user/backup.tar.gz user@example.server1.com

will transfer the file backup.tar.gz located at /home/user/ to the server named example.server1.com.

If you want to transfer a file from server to your local system, use the following command:

rsync -v -e ssh  user@example.server1.com : ~/example.txt/tmp

Now how can we keep two folders in sync always? Just add a cron job that runs the rsync command to the do the sync operation as frequently as you want it to be.


RELATED ARTICLE

/themes/custom/zyxpro_light/images/placeholder.png
close

on 04th April 2007 / by webmaster
Linux is the epitome of the FLOSS model. Technical Solution Linux installation Leave a reply Your email address will not be published. Required fields are marked * Dewey J. Corl (not verified) access_time 25 May 2020 - 01:00 Linux is not ready for the general public! (I am a Ubuntu user). For proof, 1. try to simply print labels on a Dymo label printer. It takes a LOT of work to get to the ease of label printing already available in Windows and Mac. 2. try syncing a modern Palm based PDA. Yes, jpilot and others will sync the main data, but pictures and midi files do not get transferred without a lot of extra setup. These are examples of applications that are not ready for the general public. Since an operating system only supports applications, Linux is not ready to be a common desktop for the general public. While we are waiting for the applications to catch up, keep up the good work!! Anoop John (not verified) access_time 25 May 2020 - 01:00 Dewey Yes you may be right. But these are not applications that a common man would use. A common man would use one of these applications - Internet browser, Chat Client, Email Client, Document Writer, Presentation Creator, Spreadsheet Editor, Movie Viewer, Music Player, CD/DVD Writer. Both examples you cited are more specific applications that only a small percentage of the whole population uses. It will take time before those hardware vendors identify the need from their perspective to address the Linux community. Krishnadas (not verified) access_time 25 May 2020 - 01:00 Dear Mr Anoop, Thank you very much for the free installation of LINUX done in my PC. I am getting immersed in the LINUX and seeing the versatility. To my surprise, I am able to read one of my old backup CD(wherein lot of my valuable file exist) done in DIRECT CD wizard (a custom cd writing software of Easy Cd creator in WIN98) which could not be read in XP. Installation of old version of easycd creator/direct cd program was not possible in XP. I thought that possible i lost all data. Very pleasant start! Srikanth N. S. (not verified) access_time 25 May 2020 - 01:00 Hi Anoop, My friend is thrilled with Ubuntu. One of his grouses with windows was that after OS installation, everything else is to be installed separately which is a real headache. WHereas if u install Linux, everything is installed as a package and he is thrilled to bits! Let linux installation spread in Trivandrum and your service in this direction is highly appreciated. Kepp up the good work Regards. PDA Freak (not verified) access_time 25 May 2020 - 01:00 Is it possible to install linux on a packardbell notebook ? Pagination Current page 1 Page 2 Next page Next › Last page Last » Add new comment
Leave a reply
Your email address will not be published. Required fields are marked *

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
The content of this field is kept private and will not be shown publicly.
CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.