rsync on the same server,
tested on Linux
-n, --dry-run - perform a trial run with no changes made
rsync --avx --dry-run --exclude=/lost+found/ /opt/satle/ /opt/satle/ 2>&1>/var/tmp/myrsynclog.out &
/usr/bin/rsync -avx --exclude=/lost+found/ /opt/satle/ /opt/satle/ 2>&1 >/var/tmp/rsync_oracle1.out &
To different host
tested on solaris,
#!/bin/ksh
/usr/bin/rsync -logtprz --exclude-from=/var/tmp/rsync.exclude --progress --rsync-path="sudo rsync" --rsh='ssh -l jay' /opt/satle/ jay@sama:/opt/satle/
/usr/bin/rsync -logtprz --exclude-from=/var/tmp/rsync.exclude --progress --rsync-path="sudo rsync" --rsh='ssh -l jay' /opt/satle/ jay@sama:/opt/satle/
Include the directories that you don't want to rsync.
# cat var/tmp/rsync.exclude
/myexcldir/
/myedir/
No comments:
Post a Comment