Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How do I Backup all the Databases on Server 1 and Append Restore the Backup on Server 2 so it gets all the changes in the First Server, I will do this with 7 Servers in Progression so they Loop Every 15 Minutes.

How do I Backup all the Databases on Server 1 and Append Restore the Backup on Server 2 so it gets all the changes in the First Server, I will do this with 7 Servers in Progression so they Loop Every 15 Minutes.

Scheduled Pinned Locked Moved Database
announcementmysqlsysadminhelpquestion
10 Posts 2 Posters 0 Views 1 Watching
  • 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.
  • B Offline
    B Offline
    BobClarkSQL
    wrote on last edited by
    #1

    I am using MySQL version 5.1 on each of the Networked PC's. There are 7 i all. How do I Backup all the Databases on Server 1 and Append Restore the Backup on Server 2 so it gets all the changes from the First Server, I will do this with 7 Servers in Progression so they Loop Every 15 Minutes. I am using Windows XP professional on each of the 7 Servers and the all have the same Databases. Each Server would have all the New Records in the Tables from the Previous Server. I have tried using Replication on them all but it does not update whena recors is added or changed on any of the 7 Servers. When records are added or changed on any of the 7 Servers, the other 6 must be Updated with the change or addition. I appreciate any suggestions or help or Topology changes. Regards BC

    W 1 Reply Last reply
    0
    • B BobClarkSQL

      I am using MySQL version 5.1 on each of the Networked PC's. There are 7 i all. How do I Backup all the Databases on Server 1 and Append Restore the Backup on Server 2 so it gets all the changes from the First Server, I will do this with 7 Servers in Progression so they Loop Every 15 Minutes. I am using Windows XP professional on each of the 7 Servers and the all have the same Databases. Each Server would have all the New Records in the Tables from the Previous Server. I have tried using Replication on them all but it does not update whena recors is added or changed on any of the 7 Servers. When records are added or changed on any of the 7 Servers, the other 6 must be Updated with the change or addition. I appreciate any suggestions or help or Topology changes. Regards BC

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #2

      BobClarkSQL wrote:

      ow do I Backup all the Databases on Server 1 and Append Restore the Backup on Server 2 so it gets all the changes from the First Server, I will do this with 7 Servers in Progression so they Loop Every 15 Minutes

      Not sure what you're trying to achieve with this. If you constantly restore modifications using backups from one database to another, you'll have a stand-by server. However, you're unable to modify anything on the stand-by (or 7 stand-by's in this case). Is this really what you want?

      BobClarkSQL wrote:

      I have tried using Replication on them all but it does not update whena recors is added or changed on any of the 7 Servers

      AFAIK MySQL doesn't support multi-master replication (or in other words merge replication). The only thing that comes close is clustering[^], but that's intended for distributed scenarios.

      The need to optimize rises from a bad design.My articles[^]

      modified on Thursday, January 22, 2009 9:39 AM

      B 1 Reply Last reply
      0
      • W Wendelius

        BobClarkSQL wrote:

        ow do I Backup all the Databases on Server 1 and Append Restore the Backup on Server 2 so it gets all the changes from the First Server, I will do this with 7 Servers in Progression so they Loop Every 15 Minutes

        Not sure what you're trying to achieve with this. If you constantly restore modifications using backups from one database to another, you'll have a stand-by server. However, you're unable to modify anything on the stand-by (or 7 stand-by's in this case). Is this really what you want?

        BobClarkSQL wrote:

        I have tried using Replication on them all but it does not update whena recors is added or changed on any of the 7 Servers

        AFAIK MySQL doesn't support multi-master replication (or in other words merge replication). The only thing that comes close is clustering[^], but that's intended for distributed scenarios.

        The need to optimize rises from a bad design.My articles[^]

        modified on Thursday, January 22, 2009 9:39 AM

        B Offline
        B Offline
        BobClarkSQL
        wrote on last edited by
        #3

        Yes. I have to have a solution that does not require any licensing or cost. The Information has to be updated automatically with some frequency (say every 5 to 15 minutes) so that when all 7 Stand Alone Servers have the same information and new records and record changes in all of there databases which would be identical in nature. It can be accomplished with any free tool or package that works with MySQL 5.1. They all communicate with each other and I granted access for each of them for Replication and set up Relay and Binary Log Files as is required with Replication but none of the servers get updated when new records are entered in any server or changed. If a Backup is done on any Server it takes less than a minute. If it can be Restored on the Next Server in the Change and Vice Versa, it should be OK as long as it can be deployed automatically and it is staggered so there is no Writing Conflicts. Regards BC

        W 1 Reply Last reply
        0
        • B BobClarkSQL

          Yes. I have to have a solution that does not require any licensing or cost. The Information has to be updated automatically with some frequency (say every 5 to 15 minutes) so that when all 7 Stand Alone Servers have the same information and new records and record changes in all of there databases which would be identical in nature. It can be accomplished with any free tool or package that works with MySQL 5.1. They all communicate with each other and I granted access for each of them for Replication and set up Relay and Binary Log Files as is required with Replication but none of the servers get updated when new records are entered in any server or changed. If a Backup is done on any Server it takes less than a minute. If it can be Restored on the Next Server in the Change and Vice Versa, it should be OK as long as it can be deployed automatically and it is staggered so there is no Writing Conflicts. Regards BC

          W Offline
          W Offline
          Wendelius
          wrote on last edited by
          #4

          I'm sorry, but I don't get it. Consider for example following timeline:

          Server A Server B


          insert 1 |
          | insert 2
          | |
          Backup 1 |
          | insert 3
          | |
          | Restore 1

          When Backup 1 is restored in Restore 1, inserts 2 and 3 are lost.

          The need to optimize rises from a bad design.My articles[^]

          B 1 Reply Last reply
          0
          • W Wendelius

            I'm sorry, but I don't get it. Consider for example following timeline:

            Server A Server B


            insert 1 |
            | insert 2
            | |
            Backup 1 |
            | insert 3
            | |
            | Restore 1

            When Backup 1 is restored in Restore 1, inserts 2 and 3 are lost.

            The need to optimize rises from a bad design.My articles[^]

            B Offline
            B Offline
            BobClarkSQL
            wrote on last edited by
            #5

            Data Loss is not critical. If Migration is used every 5 minutes they all synchronize with each other fine. Each server is in a stand alone world. The other servers information is not critical as long as it gets there eventually. Regards BC

            W 1 Reply Last reply
            0
            • B BobClarkSQL

              Data Loss is not critical. If Migration is used every 5 minutes they all synchronize with each other fine. Each server is in a stand alone world. The other servers information is not critical as long as it gets there eventually. Regards BC

              W Offline
              W Offline
              Wendelius
              wrote on last edited by
              #6

              So I guess you have 7 databases on each machine. Anyhow, the backup is taken using Backup[^] command and then it's restored using Restore[^] command. You can schedule these using for example Windows Task Scheduler and a command script.

              The need to optimize rises from a bad design.My articles[^]

              B 2 Replies Last reply
              0
              • W Wendelius

                So I guess you have 7 databases on each machine. Anyhow, the backup is taken using Backup[^] command and then it's restored using Restore[^] command. You can schedule these using for example Windows Task Scheduler and a command script.

                The need to optimize rises from a bad design.My articles[^]

                B Offline
                B Offline
                BobClarkSQL
                wrote on last edited by
                #7

                The backup must be done automatically on Server A and then Restored Immediately Afterwards on Server B until all 7 Servers have the Previous Servers Information. When Server B completes its Restore from Server A it must Start a Backup and complete the Sequence chain until all are updated automatically. There are 10 databases on Each Server that are identical in nature. Regards BC

                1 Reply Last reply
                0
                • W Wendelius

                  So I guess you have 7 databases on each machine. Anyhow, the backup is taken using Backup[^] command and then it's restored using Restore[^] command. You can schedule these using for example Windows Task Scheduler and a command script.

                  The need to optimize rises from a bad design.My articles[^]

                  B Offline
                  B Offline
                  BobClarkSQL
                  wrote on last edited by
                  #8

                  Only the information and new records from the Previous Server in the Change need to be Restored into the Next Servers Databases.

                  W 1 Reply Last reply
                  0
                  • B BobClarkSQL

                    Only the information and new records from the Previous Server in the Change need to be Restored into the Next Servers Databases.

                    W Offline
                    W Offline
                    Wendelius
                    wrote on last edited by
                    #9

                    Then you have to use --log-bin option and mysqlbinlog [^] utility. What comes to the other question about the sequence of operations on different server, there's no native support for that in MySQL so you can for example create one centralized script which does all the backups and restore operations on all servers. Or if you want to create a script on each server you must create a mechanism how to synchronize the operations (using for example your master database to store information what is being done and what's next).

                    The need to optimize rises from a bad design.My articles[^]

                    B 1 Reply Last reply
                    0
                    • W Wendelius

                      Then you have to use --log-bin option and mysqlbinlog [^] utility. What comes to the other question about the sequence of operations on different server, there's no native support for that in MySQL so you can for example create one centralized script which does all the backups and restore operations on all servers. Or if you want to create a script on each server you must create a mechanism how to synchronize the operations (using for example your master database to store information what is being done and what's next).

                      The need to optimize rises from a bad design.My articles[^]

                      B Offline
                      B Offline
                      BobClarkSQL
                      wrote on last edited by
                      #10

                      I am using a log-bin file on each of the Servers and Each Server is a Slave of the Previous Server with the Last One in the Chain is the the Sever for the Save Number 1. any Topology will be fine as long as all the data is the same in all the Servers at the end of the day.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups