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.
#!/bin/bash #dv backup script src=/source/data/* dest=username@machine:/destination log=/path/to/log/file 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.
Comments
cheap nfl jedsey AC Milan
cheap nfl jedsey AC Milan Jerszey buy cheap nba jerseys
Add new comment