[root@alanstudio]# rsync -av /home/alan /backup

Rsync entity folder 'alan' to destination '/backup'

[root@alanstudio]# rsync -av --delete /home/alan 192.168.1.10:/backup

Rsync entity folder 'alan' to destination 192.168.1.10 '/backup'
It will delete the destination file which is not exist in source folder.

[root@alanstudio]# rsync -av -delete --stats --progress /home/* /backup

Rsync entity folders '/home/*' to destination '/backup'
and show status and the prgressing

[root@alanstudio]# rsync -av -bwlimit=1000 --copy-links /home/alan /backup

Rsync entity folder 'alan' to destination '/backup'
with 1Mb bandwidth limitation and copy the symbolic links

[root@alanstudio]# rsync -av -e ssh /home/alan root@abc.com:/backup

Rsync via ssh to remote server

[root@alanstudio]# rsync -av -e "ssh -p 2222" /home/alan root@abc.com:/backup

Rsync via ssh port 2222 to remote server

--exclude "*.o" would exclude all filenames matching *.o --exclude "/foo" would exclude a file in the base directory called foo --exclude "foo/" would exclude any directory called foo. --exclude "/foo/*/bar" would exclude any file called bar two levels below a base directory called foo. --exclude "/foo/**/bar" would exclude any file called bar two or more levels below a base directory called foo. --include "*/" --include "*.c" --exclude "*" would include all directories and C source files --include "foo/" --include "foo/bar.c" --exclude "*" would include only foo/bar.c (the foo/ directory must be explicitly included or it would be excluded by the "*")

--exclude patten description.


Server is hosted by Alanstudio
Linux Operating System

Recommend screen resolution 1024 x 768 / IE / FireFox
Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved.