rsync

last edited Sat, 10 Feb 2024 15:04:05 GMT
backlinks: null


The most wonderul synchronization tool that can be used locally or remote host. Knowing how to properly utilize rsync can streamline backups.

Web server example where the /var/www/html directory tree will be copied to the remote host:

$ rsync -av --progress	\
	--exclude '*.swp'	\
	--exclude '/old-css/'	\
	--exclude '/old-js/'	\
	/var/www/html/ example.com:/var/www/html

Where -a denotes archive mode and -v denotes verbose mode (all transfers are narrated).