Difference between revisions of "Rsync"

From Linuxintro
imported>ThorstenStaerk
Line 1: Line 1:
 
Rsync helps you to keep two folders in sync. This is possible over the network or local.
 
Rsync helps you to keep two folders in sync. This is possible over the network or local.
  
Copy a folder from ''server'' to the current working directory:
+
= over the network =
  rsync -avv --stats --progress --partial server:/srv/repos/isos/SLES9/i386/SP2 .
+
The following command sends the directory /srv/www/htdocs over to ''server'':
 +
  rsync -avv --stats --progress --partial /srv/www/htdocs ''server'':/srv/www/htdocs
 +
 
 +
= locally =
 
Copy a folder ''.VirtualBox'' to /root:
 
Copy a folder ''.VirtualBox'' to /root:
 
  rsync -avv --stats --progress --partial .VirtualBox/ /root/.VirtualBox
 
  rsync -avv --stats --progress --partial .VirtualBox/ /root/.VirtualBox
  
 
[[Category:Command]]
 
[[Category:Command]]

Revision as of 12:05, 15 January 2012

Rsync helps you to keep two folders in sync. This is possible over the network or local.

over the network

The following command sends the directory /srv/www/htdocs over to server:

rsync -avv --stats --progress --partial /srv/www/htdocs server:/srv/www/htdocs

locally

Copy a folder .VirtualBox to /root:

rsync -avv --stats --progress --partial .VirtualBox/ /root/.VirtualBox