1

Topic: Merging sqlite db's

Hi smile
I've recently started using punbb/fluxbb forum software. I'm very impressed with it's relative simplicity and speed.

I'm trying to run 2 forums in tandem on different hosts, trying to maintain a 24 hour uptime ( if one is down etc.)

Would there be any way to merge the 2 databases together without 'breaking anything'? In this way, the forums would appear as one ...

I'm using sqlite2 ... has anybody been merging db's in this way before?
ie. any mods or plugins, perhaps?

Thanks...

Re: Merging sqlite db's

Do you want to use one merged DB for these forums? Provide more details, please.

3

Re: Merging sqlite db's

Hi Slavok smile
Well, they're running on 2 servers with 2 separate db's ... I was wondering if there was anyway to add the users/topics to each other without running sqlite manually every time.

I suppose that I have to choose a default server and run the other as a backup. However, I still have the problem of updating the backup server db regularly, and to start with they are 2 different url's which means I can't just simply 'replace one with the other'.
Perhaps I've partially answered the question myself  wink

Re: Merging sqlite db's

The sqlite database is stored in a single file on a host. It should be enough just to back up your database on the default server and revert the backup on another server. Perhaps, this article will be useful for you, despite it is about sqlite3.

5

Re: Merging sqlite db's

Hi  Slavok smile
Mmm, I looked at that article about 'backup API' but it doesn't seem to apply in sqlite2, particularly on a web server using php. I think that sqlite_open(for writing) will lock the db file, and then it can be copied and downloaded from the server.

One problem is the different URL - perhaps I can update the necessary tables with the new URL ...
I 'll have to write a script ...  hmm  ... I'll try to get round to it, it will make it a LOT easier ... still thinking.

Re: Merging sqlite db's

If you are talking about Forum internal links, they are generated based on the 'o_base_url' config parameter. It is stored in the "config" table. So you don't need to modify any url except this.
If you are talking about links in posts, then yes, you need to write a script which will modify all the links in the posts. But I think it will be easier to store two post messages for one post id - the original message and the updated message - where urls have already been modified.