Replication Content By Using Rsync

We have some project that use rsync for replication content between machines. Here's shell script. The features are when content on Machine A is deleted, content on machine B also is deleted too.


#dv backup script

[email protected]:/destination

echo "---" $(date) "-------------------" >> $log

rsync -t -r --verbose -p --delete --ignore-errors --exclude 'tmp' --exclude 'logs'  $src $dest >> $log

echo "--------------- END ---------------" >> $log

The setup crontab for syncing content. You can use exclude for ignore folder.