View Single Post

  #4 (permalink)  
Old 04-22-2006, 12:28 PM
rockdalinux's Avatar
rockdalinux rockdalinux is offline
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

Quote:
One more thing I have so many dir in mail folder but I do not want to take backup of all dir except certain dir. in this case what should I do/
Use --exclude option

Code:
rsync -avz --exclude '/mail/rocky' server1:/mail /mail
Above command will not include /mail/rocky directory. If you have lots of dir then you can store them in file. For example:

file.txt
Code:
/mail/rocky
/mail/xyz
/mail/dddd
And your command should be as follows:
Code:
rsync -avz --exclude-from file.txt server1:/mail /mail
Hope this helps
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote