![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I am wondering what would be the most efficient way to synchronize two slave databases to a master database.. Basically I need an efficient way to find if a database is out of sync and a way to sync it back to the master. Any help would be appreciated, Devin Morin |
#3
| |||
| |||
|
|
Devin M wrote: Hello, I am wondering what would be the most efficient way to synchronize two slave databases to a master database.. Basically I need an efficient way to find if a database is out of sync and a way to sync it back to the master. Any help would be appreciated, Devin Morin Real time? Or some sort of backup? as far as backup goes, you can, as I have discovered, rsync ISAM files. Ugly but it works, especially if you stop the mysqld process while you do it. Real time syncing is another matter. |
#4
| |||
| |||
|
|
On Oct 28, 1:25 pm, The Natural Philosopher<t... (AT) invalid (DOT) invalid wrote: Devin M wrote: Hello, I am wondering what would be the most efficient way to synchronize two slave databases to a master database.. Basically I need an efficient way to find if a database is out of sync and a way to sync it back to the master. Any help would be appreciated, Devin Morin Real time? Or some sort of backup? as far as backup goes, you can, as I have discovered, rsync ISAM files. Ugly but it works, especially if you stop the mysqld process while you do it. Real time syncing is another matter. Real time, would probably like to have it compare every 5 min with a cron job and then sync if it needs to. |
#5
| |||
| |||
|
|
On 10/28/2010 4:28 PM, Devin M wrote: On Oct 28, 1:25 pm, The Natural Philosopher<t... (AT) invalid (DOT) invalid wrote: Devin M wrote: Hello, I am wondering what would be the most efficient way to synchronize two slave databases to a master database.. Basically I need an efficient way to find if a database is out of sync and a way to sync it back to the master. Any help would be appreciated, Devin Morin Real time? Or some sort of backup? as far as backup goes, you can, as I have discovered, rsync ISAM files.. Ugly but it works, especially if you stop the mysqld process while you do it. Real time syncing is another matter. Real time, would probably like to have it compare every 5 min with a cron job and then sync if it needs to. TNP is incorrect (as usual). You can't just rsync the files without stopping MySQL. *A lot of data may still be held in the buffers and not written to disk yet. *The result will be an inconsistent database. Have you looked into replication? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck... (AT) attglobal (DOT) net ================== |
#6
| |||
| |||
|
|
On 10/28/2010 4:28 PM, Devin M wrote: On Oct 28, 1:25 pm, The Natural Philosopher<t... (AT) invalid (DOT) invalid wrote: Devin M wrote: Hello, I am wondering what would be the most efficient way to synchronize two slave databases to a master database.. Basically I need an efficient way to find if a database is out of sync and a way to sync it back to the master. Any help would be appreciated, Devin Morin Real time? Or some sort of backup? as far as backup goes, you can, as I have discovered, rsync ISAM files.. Ugly but it works, especially if you stop the mysqld process while you do it. Real time syncing is another matter. Real time, would probably like to have it compare every 5 min with a cron job and then sync if it needs to. TNP is incorrect (as usual). You can't just rsync the files without stopping MySQL. *A lot of data may still be held in the buffers and not written to disk yet. *The result will be an inconsistent database. Have you looked into replication? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck... (AT) attglobal (DOT) net ================== |
#7
| |||
| |||
|
|
Hello, I am wondering what would be the most efficient way to synchronize two slave databases to a master database.. |
|
Basically I need an efficient way to find if a database is out of sync and a way to sync it back to the master. |
#8
| |||
| |||
|
|
No I have not looked into replication yet, however I was thinking that an easier solution might be to push the data to the slave servers whenever a record is created or updated. |
#9
| |||
| |||
|
|
Devin M <devin... (AT) gmail (DOT) com> wrote: No *I have not looked into replication yet, however I was thinking that an easier solution might be to push the data to the slave servers whenever a record is created or updated. LOL. This is exactly how MySQL implements replication. XL |
#10
| |||
| |||
|
|
On Oct 28, 1:56 pm, Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote: On 10/28/2010 4:28 PM, Devin M wrote: On Oct 28, 1:25 pm, The Natural Philosopher<t... (AT) invalid (DOT) invalid wrote: Devin M wrote: Hello, I am wondering what would be the most efficient way to synchronize two slave databases to a master database.. Basically I need an efficient way to find if a database is out of sync and a way to sync it back to the master. Any help would be appreciated, Devin Morin Real time? Or some sort of backup? as far as backup goes, you can, as I have discovered, rsync ISAM files. Ugly but it works, especially if you stop the mysqld process while you do it. Real time syncing is another matter. Real time, would probably like to have it compare every 5 min with a cron job and then sync if it needs to. TNP is incorrect (as usual). You can't just rsync the files without stopping MySQL. A lot of data may still be held in the buffers and not written to disk yet. The result will be an inconsistent database. |
|
Have you looked into replication? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck... (AT) attglobal (DOT) net ================== No I have not looked into replication yet, however I was thinking that an easier solution might be to push the data to the slave servers whenever a record is created or updated. What I have right now are a few DNS Servers that use MySql for the data store. Maybe I can write a C daemon to monitor the primary database and if there are any changes it can send them over the network to a client running on the slave servers? Would I be basically duplicating any replication solutions that are already out there? Regards, Devin |
![]() |
| Thread Tools | |
| Display Modes | |
| |