hi ya robin
> I have had success mirroring linux with Redhat 5.2. I used the same procedure
> (minor variations) on 6.0 and the process does not work. Is there a tried and
> true way to mirror?
my understanding of mirroring.....got carried away in my mirroring scenario...
using hardware or software mirroring...like raid1...
normally...
- it copies data to disk1 and also copies/mirrors to disk2
- mirroring is almost instantaneous...
- if disk1 dies for whatever reason...you have data on disk2
- no problem...all's well....replace disk1 and resync
other failure modes
- if you get some kind of corruption due to a hacker,
accidental rm -rf /, power supply surges, bad cvs, bad memory,
bad e2fsck passes, etc...
- all data on disk1 will be mirrored to disk2
including the *bad data*...so you lose all your data...
- your data on the mirror should also be backed up elsewhere..
( tape, other disks on other machines )
- this is what I want to protect against...
- if they did rm -rf /.... I can still recover in minutes after rm -rf
completed....
Using "cron" or programs to periodically mirror data...
mirror.pl is freely available to mirror data from one server to another
checked a few other mirror programs...but did not meet my needs - bidirectonal
mirroring...
( so i wrote one )
normally...
- run mirror.pl thru cron or other mechanisms...
- mirror the data as often as you like to keep your data in sync
for the "other failur modes".... this should prevent the
*good data* from being deleted due to instant mirroring...
.. should also prevent bad data from corrupting the good data...
-
other issues
- might want to keep a local mirror ( raid1 ) for protecting data
before the data was mirrored/copied to another system
Bidirectional mirroring...tricky stuff ???
-
- mirror /home1 to /home2
- mirror /home2 to /home1
-
- usually /home1 is the main/primary server... and /home2 is the mirror in my
case...
-
- what happens when data on /home1/foo.txt is deleted... do we delete it on
/home2/foo.txt ??
- what happens when data on /home2/foo.txt is deleted... do we delete it on
/home1/foo.txt ??
- what happens when someone is editing /home1/foo.txt...and someone else is
editing /home2/foo.txt
- how often does one go delete old/obsolete files on the other mirror ?
- if /home1/file.txt was deleted... do we immediately delete it on
/home2/file.txt
-
- one mirror pass from /home1 to /home2 takes about 1 hour to complete in my
case...
- even hours from /home1 to /home2...
- odd hours from /home2 to /home1
What is the difference between backups and mirroring ???
-
- I create and keep daily_changes.tgz for backups...
- I expand and copy/mirror those same daily_changes.tgz onto the mirror machine
-
- i wrote a mirror program that does this...
- does hourly mirror,
- does daily incremental backups since last full backup
- does weekly incremental backup over 30 days
- does full backup
-
- can point to different backup machines Backup.Full, Backup.Daily,
Backup.Hourly
... yes... it was fun to write that bidirectional mirror program...
- would like to clean it aup and release it under gpl
have fun
alvin