Re: Recombining a split database
Jeff Taylor <[email protected]>
| Newsgroups | gmane.comp.web.mnogosearch.general |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the reply, but I found a solution over the weekend. I used the technique for adding new cluster nodes (http://www.mnogosearch.org/doc33/msearch-cluster.html#cluster-addnode) and decreased my number of nodes down to one machine. The final database seemed to be off by about a dozen entries, but that was close enough for my purposes. y new machine is indexing around 30-40,000 pages a day, and looks like it should be completely up to date within the next 24 hours. On 11/07/2011 01:16 AM, Alexander Barkov wrote: > > > On 11/02/2011 10:44 PM, Jeff Taylor wrote: >> When I first set up mnogosearch I had a page list of around 5 million >> entries, however after some reconsiderations I have gotten that number >> back down to a more manageable 700K. Because of this, I would like to >> know if there is a way I can recombine my three databases back into a >> single database, without having to re-index the entire set of pages again? > > This scenario this should work: > > 1. Backup your data, for the case if something goes wrong > > 2. Find maximum URL id in the first database: > > SELECT max(rec_id)+1 FROM url; > > Suppose it returns 10000000. > > 3. Update URL id in the second database for 3 tables: > > UPDATE url SET rec_id=rec_id + 10000000; > UPDATE urlinfo SET url_id=url_id + 10000000; > UPDATE bdicti SET url_id=url_id + 10000000; > > Instead of 10000000 use the real number returned at the previous step. > > 4. Dump these three tables in the second database into a file. > Only data, without CREATE TABLE statements! > In case of MySQL it will be: > > mysqldump --no-create-info db2 url urlinfo bdict >dump.sql > > 5. Load the dump into the first database. > In case of MySQL it will be: > > mysql db1 < dump.sql > > It should work without failures, because at step #3 we made IDs unique. > > 6. Fix indexer.conf and search.htm: removed the second DBAddr command. > > 7. Recreate search index: > > indexer -Eblob > > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected]