PDA

View Full Version : Mirroring Software


llbbl
05-20-2005, 11:51 AM
I am looking for a publicly configurable cron script or a program that will automatically mirror all data in one folder to another folder. This can be done on the fly or as part of a nightly job. I know there are programs out there like that for Linux, but I am not sure what is the names of them.

llbbl
05-20-2005, 11:52 AM
disk mirroring

A technique in which data is written to two duplicate disks simultaneously. This way if one of the disk drives fails, the system can instantly switch to the other disk without any loss of data or service. Disk mirroring is used commonly in on-line database systems where it's critical that the data be accessible at all times.

sorta like that. from webopedia

openbsd-flipp
06-06-2005, 10:05 AM
would a straight disk dump work for you?
the contents of the cron script would be
/usr/sbin/dd if=/dev/sda1 of=/dev/sdb1

spankers
06-07-2005, 02:08 AM
Use rsync... it can be set to update/copy only files that have been updated. This is VERY useful if you have large volumes to mirror. I use it to mirror my 60GB mp3 repository from a NFS volume to a USB backup drive:
rsync -auv --filter="- lost+found" /mnt/music /mnt/sda1 The --filter option allows you to exclude subdirectories/files that match.

rsync does some interesting things with trailing slashes in the path names... so PLEASE read the man page... particularly if you decide to use the --delete option (this will delete files on the receiving volume that no longer exist on the original).

As usual 'man rsync' will give the pertinent information if you have rsync installed.