LAMP replication to DR site
-
What would be the best option to replicate a LAMP server to a DR location. I got a request to setup this . RPO of 24 hour RTO of 1 hour. I am thinking of using rsync, that takes care of the webserver part. While looking at Mysql replication, i read this one https://www.percona.com/blog/2010/07/31/why-you-cant-rely-on-a-replica-for-disaster-recovery/
Suggestions please
-
Depends on your goal. Is your goal fault tolerance? The you use replicas. If your goal is disaster recovery, then you restore from a backup.
-
Maybe this? http://www.mondorescue.org/
-
@aaronstuder said in LAMP replication to DR site:
Maybe this? http://www.mondorescue.org/
You would just take a database backup. It would be tiny and fast. Then you only ship over the database files, not the full thing.
And you can take the backup from the remote site, so no need to ship the files over the Internet.
-
Goal is disaster recovery. What would be the best choice here for the backup? Does mysql replication helps in this case?
-
@Ambarishrh said in LAMP replication to DR site:
Goal is disaster recovery. What would be the best choice here for the backup? Does mysql replication helps in this case?
Only if you want to replicate to the remote site and then take the backup there. Replication is not part of backup. Replication is tightly couples, backup is decoupled.
Replication is disaster avoidance (HA), backup is disaster recovery.
-
So in the case of backup, what would be the best option? I still need to get info if they have virtualised servers, if so was thinking about Veeam
-
@Ambarishrh said in LAMP replication to DR site:
So in the case of backup, what would be the best option? I still need to get info if they have virtualised servers, if so was thinking about Veeam
No, just use MySQL's own backup. Veeam would product a backup of the whole system. You just one a single file.
-
THis is all that you need. Take the backup and SCP it over to the other machine or Rsync it over.
-
Ok, so rsync for the files+mysqldump and rsync that too. So just save the mysqldumps on dr location and when something happens, just restore the last backup and bring the server live?
-
@scottalanmiller What about the files?
-
@Ambarishrh said in LAMP replication to DR site:
Ok, so rsync for the files+mysqldump and rsync that too. So just save the mysqldumps on dr location and when something happens, just restore the last backup and bring the server live?
Yep
-
@aaronstuder said in LAMP replication to DR site:
@scottalanmiller What about the files?
That's the "rsync"
-
How about setup MySQL replication to remote site and then enable MySQLdump local backup on the DR site as well with increased frequency than daily ( may be twice a day). This way we have an up to date/latest copy and in case let's say there was a drop table command on master, and primary site failed, I can still switch to secondary, use the latest mysql backup to restore and make it up and running.
-
@Ambarishrh said in LAMP replication to DR site:
Ok, so rsync for the files+mysqldump and rsync that too. So just save the mysqldumps on dr location and when something happens, just restore the last backup and bring the server live?
Yes. But do a restore from time to time to test them, of course.
-
@Ambarishrh said in LAMP replication to DR site:
How about setup MySQL replication to remote site and then enable MySQLdump local backup on the DR site as well with increased frequency than daily ( may be twice a day). This way we have an up to date/latest copy and in case let's say there was a drop table command on master, and primary site failed, I can still switch to secondary, use the latest mysql backup to restore and make it up and running.
Yup, that's what I would do. Get HA and DR all in one setup. Have it take backups 24 times a day if you want. The impact is pretty much zero.