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/*
[email protected]:/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.

Tags: 

Comments

cheap nfl jedsey AC Milan Jerszey buy cheap nba jerseys

Email / Website: 

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.