Recreate site with just database file? [SOLVED]

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Recreate site with just database file?

Post by Thorsten »

Hi,
Mercury wrote:I tried to import the database again with the tools at byethost. This is what I get:

Code: Select all

Error

SQL query:

-- pmf2.5: myfaq_faquser myfaq_faqadminlog myfaq_faqcaptcha myfaq_faqcategories myfaq_faqcategory_group myfaq_faqcategory_user myfaq_faqcategoryrelations myfaq_faqchanges myfaq_faqcomments myfaq_faqconfig myfaq_faqdata myfaq_faqdata_group myfaq_faqdata_revisions myfaq_faqdata_tags myfaq_faqdata_user myfaq_faqglossary myfaq_faqgroup myfaq_faqgroup_right myfaq_faqlinkverifyrules myfaq_faqnews myfaq_faqquestions myfaq_faqright myfaq_faqsearches myfaq_faqsessions myfaq_faqstopwords myfaq_faqtags myfaq_faquser_group myfaq_faquser_right myfaq_faquserdata myfaq_faquserlogin myfaq_faqvisits myfaq_faqvoting
-- DO NOT REMOVE THE FIRST LINE!
-- pmftableprefix: myfaq_
-- DO NOT REMOVE THE LINES ABOVE!
-- Otherwise this backup will be broken.
-- Table: myfaq_faquser
INSERT INTO myfaq_faquser( user_id, login, session_id, session_timestamp, ip, account_status, last_login, auth_source, member_since )
VALUES ( 1, 'admin', NULL , 1293209577, '64.220.221.158', 'protected', 20101224175143, 'local', 20091118141848 ) ;

MySQL said: Documentation
#1062 - Duplicate entry '1' for key 1
please empty the tables before you insert your backup. This can't work. A fresh install of phpMyFAQ has a some default values like an admin user. If you restore a database you have to empty - and not delete - the tables.
I will think about your offer but to be honest you don’t inspire me with confidence. If you did alter the database I would have no idea what you did. Either I fix this problem myself or I will abandon this software.
I release my software as open source. I have an open support board here. Isn't hat enough confidence? I support you for free during my holidays.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Mercury
Posts: 51
Joined: Fri Dec 17, 2010 9:25 pm
Contact:

Re: Recreate site with just database file? [SOLUTION]

Post by Mercury »

I fixed the problem (before I read your last post).

Here’s the procedure:
  1. Using phpMyFAQ 2.5.4 at source site create a database backup and save it to hard drive.
  2. In a text editor open database backup made in step 1 and note the table prefix.
  3. Install phpMyFAQ 2.5.4 at destination host. During install specify a table prefix that matches the table prefix in the source site database backup made in step 1.
  4. Go to destination host. Use phpMyAdmin to empty all tables in database.
    Using phpMyAdmin at destination host import database backup made in step 1.
  5. After a successful import the web site at destination host will be identical to web site at source host.
The question in my OP is now answered. Better late than never.
www.puppylinuxforum.org
Mercury
Posts: 51
Joined: Fri Dec 17, 2010 9:25 pm
Contact:

Re: Recreate site with just database file? [SOLVED]

Post by Mercury »

@Thorsten
I hope you will accept my apology. I blamed you for something that’s not your fault.

I suspect I may know who added the prefix to those tables during the install at the original site. I guess I will be forever stuck with it.
www.puppylinuxforum.org
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Recreate site with just database file? [SOLVED]

Post by Thorsten »

Hi,
Mercury wrote:@Thorsten
I hope you will accept my apology. I blamed you for something that’s not your fault.
sure, no problems!

I will add some more hints about errors for the restore functionality in the next release!

Thanks for still using phpMyFAQ!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply