Excuse me if my English is not well. I have some questions about server mirroring.

  1. Could mirroring replace backup? or I need both of them?
  2. If main server goes down and users change files and DB on the mirror server. what will be happening to main server?
  3. Is sync process automatic and real time? or I must manage it?
  4. Can I mirror 2 servers in different data centers?

I am going to assume you mean maintaining a pair of servers and mirroring the data between them.

This is a very complex question, the answer to your general question is yes, you can do this but there are many aspects to consider like performance, rate of change, snapshots etc.

Mirroring (replication) does NOT replace backups. You could argue that replication + snapshots could replace backups but that's debatable (I think when done well it is but others would disagree).

You should look at the rsync utility. At a minimum it's capabilities will give you an idea of what is possible and how to set it up. There is also "synchronous replication" where each write is done to both locations before being acknowledged as successful. This is quite a bit tricker to do properly and can require a large low latency network connection if you have a high rate of change for the data you are replicating.

|improve this answer|||||
  • Thanks. Is there any linux HA solution that works with vps hosted in different data centers ?rsync is not real time . i'm looking for 100% real time solution – Shervin Jan 13 '16 at 7:30
  • There is no such thing as real time..do you mean synchronous? Where a write to one location must be completed at both locations until it's available to a client? There are. you should look at global file systems like gluster, hadoop FS or Ceph. All of these require a pretty deep understanding of how the underlying technology works. – TheFiddlerWins Jan 15 '16 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.