ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    LAMP replication to DR site

    IT Discussion
    mysql lamp disaster recovery linux replication backup and disaster recovery
    4
    16
    4.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • AmbarishrhA
      Ambarishrh
      last edited by

      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

      1 Reply Last reply Reply Quote 1
      • scottalanmillerS
        scottalanmiller
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • A
          Alex Sage
          last edited by

          Maybe this? http://www.mondorescue.org/

          scottalanmillerS 1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller @Alex Sage
            last edited by

            @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.

            1 Reply Last reply Reply Quote 0
            • AmbarishrhA
              Ambarishrh
              last edited by

              Goal is disaster recovery. What would be the best choice here for the backup? Does mysql replication helps in this case?

              scottalanmillerS 1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller @Ambarishrh
                last edited by

                @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.

                1 Reply Last reply Reply Quote 1
                • AmbarishrhA
                  Ambarishrh
                  last edited by

                  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

                  scottalanmillerS 1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller @Ambarishrh
                    last edited by

                    @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.

                    1 Reply Last reply Reply Quote 2
                    • scottalanmillerS
                      scottalanmiller
                      last edited by

                      THis is all that you need. Take the backup and SCP it over to the other machine or Rsync it over.

                      https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html

                      A 1 Reply Last reply Reply Quote 3
                      • AmbarishrhA
                        Ambarishrh
                        last edited by

                        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?

                        travisdh1T scottalanmillerS 2 Replies Last reply Reply Quote 1
                        • A
                          Alex Sage @scottalanmiller
                          last edited by

                          @scottalanmiller What about the files?

                          travisdh1T 1 Reply Last reply Reply Quote 0
                          • travisdh1T
                            travisdh1 @Ambarishrh
                            last edited by

                            @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

                            1 Reply Last reply Reply Quote 0
                            • travisdh1T
                              travisdh1 @Alex Sage
                              last edited by

                              @aaronstuder said in LAMP replication to DR site:

                              @scottalanmiller What about the files?

                              That's the "rsync"

                              1 Reply Last reply Reply Quote 2
                              • AmbarishrhA
                                Ambarishrh
                                last edited by

                                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.

                                scottalanmillerS 1 Reply Last reply Reply Quote 1
                                • scottalanmillerS
                                  scottalanmiller @Ambarishrh
                                  last edited by

                                  @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.

                                  1 Reply Last reply Reply Quote 1
                                  • scottalanmillerS
                                    scottalanmiller @Ambarishrh
                                    last edited by

                                    @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.

                                    1 Reply Last reply Reply Quote 4
                                    • 1 / 1
                                    • First post
                                      Last post