We help IT Professionals succeed at work.

mirroring scripts

raza asked
I have Solaris network on two location. Both networks are accessible by VPN for each other. The speed between two network is slow.

I would like to setup a mirroring scripts to have mirrored directories for both location.

Network1                 Network2
/mirrornet1    ----->   /mirrornet1
/mirrornet2    <-----   /mirrornet2

I need a mirroring script that can mirror a directory and all directory/files under that directory. This script should make sure all the files and directories will get mirrored for any reason if mirror interrupt, It should email the error message. Also after the initial mirrored it should always send email the list of updated directories/files that have been mirrored.

Any help will be appreciated.

Watch Question


get rsync from http://rsync.samba.org/ then your script consist just of a few rsync commands
Even over the VPN, you may still consider running it over SSH.  www.openssh.org.


Why? IPsec encription is not enough?

rsync is very nice utility. Can you also let me know the rsync scripts how should it look like.....

rsync scripts?

you simply write them yourself with rsync commands, like

    rsync -u -l -a -r user@remotehost:/path/to/dir .

if you set the RSYNC_RSH environment variable to ssh, rsync uses ssh connections (same as --rsh=ssh option).

Explore More ContentExplore courses, solutions, and other research materials related to this topic.