Is it possible to manually restore an older database?

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
User avatar
Warmbells
Registered User
Posts: 38
Joined: Sun Jul 11, 2004 10:10 pm
Location: England

Is it possible to manually restore an older database?

Post by Warmbells »

Hi,

I had a major problem with our site and lost the forum, I have installed the latest version of phpBB2. When I try to restore the old database I get errors of duplicate entries, is there any way I can restore some of the database? I wouldn't mind spending some time if I could replace some of the informational postings that had been provided. I can see all the information in the dump of the database phpbb_db_backup.sql if I open it in notepad or in Crimson Editor.

Is there a tool available that will let me insert the information in the text file into the database?

Thanks

Gerald
PS. Help raise money for Animals in distress just by searching the web!

We are listed on everyclick.com, the search engine that helps charity.
Please follow this link and set everyclick as your home page so that all of your searching benefits Animals in distress http://www.everyclick.com/uk/animalsindistress
marcus.smith
Registered User
Posts: 916
Joined: Sun Oct 10, 2004 9:58 pm

Re: Is it possible to manually restore an older database?

Post by marcus.smith »

If you have phpMyAdmin, try importing the sql file through that.
..: Ma®©uS™ :..
Image Mods: Contact Form | Hex BBCode | Login Name
User avatar
Warmbells
Registered User
Posts: 38
Joined: Sun Jul 11, 2004 10:10 pm
Location: England

Re: Is it possible to manually restore an older database?

Post by Warmbells »

Thanks,

I've already tried that with the same results, I can't see any duplicate entries though.
PS. Help raise money for Animals in distress just by searching the web!

We are listed on everyclick.com, the search engine that helps charity.
Please follow this link and set everyclick as your home page so that all of your searching benefits Animals in distress http://www.everyclick.com/uk/animalsindistress
marcus.smith
Registered User
Posts: 916
Joined: Sun Oct 10, 2004 9:58 pm

Re: Is it possible to manually restore an older database?

Post by marcus.smith »

When importing through phpMyAdmin it should normally report on which line the error/duplicate is found because it stops importing at that point. There you'll find the problem.

Note that if you're repeatedly trying to import into the same database without wiping it clean before each attempt you'll have a duplicate right from line 1. phpMyAdmin imports until it reaches a fault then stops. It retains the data uploaded to that point.. awkward as it seems.
..: Ma®©uS™ :..
Image Mods: Contact Form | Hex BBCode | Login Name
cybrid23
Former Team Member
Posts: 9877
Joined: Wed Jun 29, 2005 5:55 am
Location: Somewhere in the Midwest...
Contact:

Re: Is it possible to manually restore an older database?

Post by cybrid23 »

You could just drop all the tables.

You can also leave out the parts about the search tables, as this is usually where the duplicate error occurs.

This article also has info on restoring your database:

Knowledge Base - How to move a phpBB 2.0.x board to a new server
---Never leave home without a towel and your peril sensitive sunglasses.
---Do Not PM Me For Support. It will go unanswered.
Thanks.
StefanL
Registered User
Posts: 2265
Joined: Wed Jul 23, 2003 10:10 pm

Re: Is it possible to manually restore an older database?

Post by StefanL »

Warmbells wrote:Thanks,

I've already tried that with the same results, I can't see any duplicate entries though.
Open your backup (COPY of course) in a plain text editor and
FIND

Code: Select all

CREATE TABLE phpbb_search_wordlist ( word_text varchar(50) NOT NULL, word_id mediumint(8) unsigned NOT NULL auto_increment, word_common tinyint(1) unsigned NOT NULL, PRIMARY KEY (word_text), KEY word_id (word_id));
REPLACE WITH

Code: Select all

CREATE TABLE phpbb_search_wordlist (
  word_text varchar(50) binary NOT NULL default '',
  word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
  word_common tinyint(1) unsigned NOT NULL default '0',
  PRIMARY KEY (word_text),
  KEY word_id (word_id)
);
You will get rid the famous duplicate key error.
Hope this helps.
When I suggest that you should alter your files, BACKUP them BEFORE.
User avatar
Warmbells
Registered User
Posts: 38
Joined: Sun Jul 11, 2004 10:10 pm
Location: England

Re: Is it possible to manually restore an older database?

Post by Warmbells »

Thanks for all the replies,

I have finally got the old members and forums back, I emptied all the tables and then imported the original database backup, just need to go through the mods again to see if any added any tables.

Gerald
PS. Help raise money for Animals in distress just by searching the web!

We are listed on everyclick.com, the search engine that helps charity.
Please follow this link and set everyclick as your home page so that all of your searching benefits Animals in distress http://www.everyclick.com/uk/animalsindistress
User avatar
Lumpy Burgertushie
Registered User
Posts: 68169
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Is it possible to manually restore an older database?

Post by Lumpy Burgertushie »

make sure the next time you make a backup , that the backup file includes the DROP TABLE command.

the backup in the phpbb admin panel does this automatically. If you are using phpmyadmin or something else to make the backups, then you will have to tel it to do this.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
Locked

Return to “2.0.x Support Forum”