Comentum Site Map
 
 

Comentum Corp.

 
 

Creative Services

Interactive Multimedia Concept Marketing Broadband Technology
 

 

:: COMPANY
:: CAREERS
:: CONTACT INFO
:: TERMS & PRIVACY

 

 


rsync

rsync is a great tool for backing up and restoring files. I'll use some example to explain on how it works:

"comentum" is an example directory
"test.txt" is an example file
"design.comentum.com" is an example of remote host
"bob" is an example user
"/home/bob/" is an example of directories (usually linux user's home page)
"/Users/backup/" is an example of backup directories (usually OS X user's home page)


To copy a file from a remote computer to the computer you are working on type:
rsync bob@design.comentum.com:/home/bob/test.txt     /Users/backup/

Or to copy the whole directory "comentum":
rsync -r bob@design.comentum.com:/home/bob/comentum     /Users/backup/comentum

To copy the above process in reverse, just reverse the above line for example the below will copy the folder comentum to the computer at: design.comentum.com and the folder: /home/bob/comentum
rsync -r /Users/backup/comentum bob@design.comentum.com:/home/bob/comentum

Here is a summary of the few usable options:

Use the options like these examples:
rsync -rv
rsync -arv
rsync -arvz

r = recursive - means it copies directories and sub directories
v = verbose - means that it prints on the screen what is being copied
a = archive - means that symbolic links, devices, attributes, permissions, ownerships, etc. are preserved in the transfer
z = compress - compress file data


More Examples:

# rsync -r /CustomersArt/ /Volumes/Backup/CustomersArt/
The above example will copy the content of CustomersArt to /Volumes/Backup/CustomersArt/

# rsync -r /CustomersArt /Volumes/Backup/CustomersArt
The above example will copy the folder CustomersArt and its content to /Volumes/Backup/CustomersArt (it will create the folder: CustomersArt).

When using "/" at the end of source, rsync will copy the content of the last folder.
When not using "/" at the end of source, rsync will copy the last folder and the content of the folder.

When using "/" at the end of destination, rsync will paste the data inside the last folder.
When not using "/" at the end of destination, rsync will create a folder with the last destination folder name and paste the data inside that folder.
Bernard Kohan © 2007
Website Design and Development - San Diego, Chicago, Austin, Irvine, Los Angeles, Ft Lauderdale, Jacksonville
Website Database Development - - San Diego, Chicago, Austin, Irvine, Los Angeles, Ft Lauderdale, Jacksonville
Website Design and Flash Animation - San Diego, Chicago, Austin, Irvine, Los Angeles, Ft Lauderdale, Jacksonville

 

 

  San Diego • Los Angeles • Chicago • 800-387-1920  


 

Comentum Corporation, Copyright © 1996-2007