Difference between revisions of "Rsync"

From Linuxintro
Line 3: Line 3:
 
= over the network =
 
= over the network =
 
The following command sends the directory /srv/www/htdocs over to ''server'':
 
The following command sends the directory /srv/www/htdocs over to ''server'':
  rsync <html><acronym title="archive mode: recurse into directories, copy symlinks as symlinks, preserve permissions, modification time, group, owner, special device files; be very verbose>-avv</acronym> --stats <acronym title="show a progress">--progress</acronym></html> --partial /srv/www/htdocs ''server'':/srv/www
+
  rsync <html><acronym title="archive mode: recurse into directories, copy symlinks as symlinks, preserve permissions, modification time, group, owner, special device files; be very verbose">-avv</acronym> --stats <acronym title="show a progress">--progress</acronym></html> --partial /srv/www/htdocs ''server'':/srv/www
  
 
= locally =
 
= locally =

Revision as of 06:22, 16 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 <html><acronym title="archive mode: recurse into directories, copy symlinks as symlinks, preserve permissions, modification time, group, owner, special device files; be very verbose">-avv</acronym> --stats <acronym title="show a progress">--progress</acronym></html> --partial /srv/www/htdocs server:/srv/www

locally

Copy a folder .VirtualBox to /root:

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

See also