Jump to content

Recommended Posts

Posted

Hello,

 

I need to do the following every day, basically i need it to backupmy phpBB database, but then to copy the data into another (on the same website/cpanel) database, but not overwrite any existing data, just update the data. Make sense?

 

(E.g. say i have post 1, 2, 3, 4, 5 on the existing database, i back this up, and then transfer it to the other database which only has post 1 and 2 in, it basically doesnt overwrite this, but fills in the rest!)

 

Any ideas anybody?

 

Thanks

 

Jimuni

 

*waves to all TCH staff*

Posted

Hey Jim, how are you? ;)

 

I don't have much time but here's a thought:

 

Create a PHP script to be called by a cron job. The PHP code in it would perform the following tasks:

1 - get the last post ID from the backup database.

2 - get all posts from the main database with an SQL query using "WHERE pid>$last_post_id".

3 - insert those posts into the backup database.

 

I can elaborate on that later, if you want. ;)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...