Recreate site with just database file? [SOLVED]

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Mercury
Posts: 51
Joined: Fri Dec 17, 2010 9:25 pm
Contact:

Recreate site with just database file? [SOLVED]

Post by Mercury »

Can I install phpMyFAQ and restore my articles with a database file made from a different site? Is this even possible? I chose this method to move my site because I don’t have the rest of the site files. Reason is that a friend hosted the original site for me. I could ask him to zip up the entire site and send it to me but I wanted to see if it was possible to recreate the site this way plus I wanted to learn how to install the software.

The original site was version 2.5. I (stupidly?) installed version 2.6 at a new host in hopes I could restore my original database in that and bypass the normal upgrade process.

After installation I downloaded a database from version 2.6 and compared that to 2.5 and realized that the format is slightly different. I then made a copy of my original database and edited that as best I could to make it match the version 2.6 database.

My attempts at restoring this modified version have thus far been unsuccessful. When I try to restore the database in the admin I see “You are not authorized”. I suspect this is because I'm logged in as a different user than the one in the modified database.

I also tried to restore the database using the PHPmyAdmin import feature in the Vistapanel at byethost. This failed too but it did give more meaningful error messages. The last message was:

Code: Select all

Error
SQL query:

-- pmf2.5: faquser faqadminlog faqcaptcha faqcategories faqcategory_group faqcategory_user faqcategoryrelations faqchanges faqcomments faqconfig faqdata faqdata_group faqdata_revisions faqdata_tags faqdata_user faqglossary faqgroup faqgroup_right faqlinkverifyrules faqnews faqquestions faqright faqsearches faqsessions faqstopwords faqtags faquser_group faquser_right faquserdata faquserlogin faqvisits faqvoting
-- DO NOT REMOVE THE FIRST LINE!
-- pmftableprefix:
-- DO NOT REMOVE THE LINES ABOVE!
-- Otherwise this backup will be broken.
-- Table: faquser
INSERT INTO faquser( user_id, login, session_id, session_timestamp, ip, account_status, last_login, auth_source, member_since )
VALUES ( 1, 'admin', '33a9f2c01ce869b2dfe1693e0e07fc2f', 1292791238, 'myipaddressremoved', 'protected', 20101219213719, 'local', 20101218031139 ) ;

MySQL said: Documentation
#1062 - Duplicate entry '1' for key 1


I have failed to fix this.

I’m considering deleting the 2.6 install then installing version 2.5 then restoring the database and then upgrade to 2.6 (if that's even possible). Or asking my friend to send me the entire site which I would upload to the host and then upgrade to 2.6. Doubtless the second option is easier than what I've been doing but I learned much by trying it the other way.

I apologize for the length of this post but I figured it would save time if I made a complete confession up front. Thank you for your help.

Here is the answer to this problem.
Last edited by Mercury on Tue Dec 28, 2010 10:57 pm, edited 2 times in total.
www.puppylinuxforum.org
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Recreate site with just database file?

Post by Thorsten »

Hi,

I would suggest you'll install 2.5.9, import your data and then upgrade to 2.6.13. Should be done in less than half an hour. :-)

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?

Post by Mercury »

Could not find 2.5.9 so I installed the version that I was using at the original site which was 2.5.4.

Question: When I restore a database from the original site all links on the new site are broken because the new site has a different domain name. Can this be fixed? Using the DN from the original site is not an option until after I confirm that I can restore all of my articles to the new site.
www.puppylinuxforum.org
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Recreate site with just database file?

Post by Thorsten »

Hi,

you can change the URL in the configuration. Old versions can be found here: http://www.phpmyfaq.de/download_old.php

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?

Post by Mercury »

In Main Configuration I have set “Base URL for link verification” to: http://www.webman.byethost1.com/faq/ But the links are still broken. What am I doing wrong?
Last edited by Mercury on Sun Dec 26, 2010 12:23 am, edited 1 time in total.
www.puppylinuxforum.org
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Recreate site with just database file?

Post by Thorsten »

Hi,

there are the old links?

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?

Post by Mercury »

Your post makes no sense to me. What do you mean?

What you see at the site (page I linked to in previous post at byethost) is the result of a database restore I did with the very first backup I made last November at the original site. When I click any link on that page I get: http://custom404error.com and then a bogus search results page. I suspect this is the default 404 page setup by byethost.

If you want to see my original site, the site I'm trying to recreate, then click the globe on the right of my posts.

I don’t know how to revert the database to it’s original state as it was when the software was initially installed so I will delete it again (6 times and counting) then reinstall and create one category containing one article. If that category and article work I will know that the software will run at byethost. At least I will know the answer to that question.

The delete/reinstall will take over an hour. I’ll start after I’ve had my breakfast and coffee. You can see what time it is in my part of the world here: http://www.worldtimezone.com/
www.puppylinuxforum.org
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Recreate site with just database file?

Post by Thorsten »

Hi,

now I have my holidays and I can help you faster. If you like you can contact me via Skype.

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?

Post by Mercury »

Skype might be interesting except I don’t have it. I do have Psip but I have not had occasion to use it so I would have to set it up. What is your Skype contact information? Is it a phone number or what? Send me a PM in the forum if you don’t want to post it here.

I have good news! Directly after the reinstall I successfully created a new category and then made a new article in that category. When I went to the front end I was able to click the new category and then view the new article. I now know for a fact that phpmyfaq will run at byethost.

I have bad news. After doing a database restore in the admin I went to the front end, then when I click a link to a category or an article I get that same pissing page: http://custom404error.com/ Again in the Main Configuration I have set “Base URL for link verification” to: http://www.webman.byethost1.com/faq/ But the links are still broken. I suspect that the Base URL feature is not working. Do you know how to fix this?
Last edited by Mercury on Sun Dec 26, 2010 12:23 am, edited 1 time in total.
www.puppylinuxforum.org
Mercury
Posts: 51
Joined: Fri Dec 17, 2010 9:25 pm
Contact:

Re: Recreate site with just database file?

Post by Mercury »

I have good news! All of the links are now working. My guess is that there is a lag between the time you change the Base URL and when the software applies the changes to every link on the site.

This is real progress, but I haven’t reached my ultimate goal yet. The database I restored was the first backup I ever made and it only contains 9 articles. My original site has 160 articles. Later today I will try to restore that backup. I hope I don't break the site. Wish me luck!
www.puppylinuxforum.org
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Recreate site with just database file?

Post by Thorsten »

Hi,

good luck then! :-)

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?

Post by Mercury »

Bad news, I see this messsage when I try to restore my most recent database with all 160 articles: "This does not seem to be a backup of phpmyfaq." How do I fix this?

The database I'm trying to restore was made this morning at the original site.

I know I correctly installed the software. I know this because I am able to restore an early database backup I made with at the original site.

It makes no sense to me why I can restore an old database but not a database that I downloaded just today.

I have repeatedly downloaded the database from the original site just in case there was a problem with it but it makes no difference.

I have tried everything I can think of to remedy this problem.

What will I do if I can't restore my articles at my new site???
www.puppylinuxforum.org
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Recreate site with just database file?

Post by Thorsten »

Hi,

so you tried to restore a 2.6 installation with a 2.5 backup? That won't work because of the changed database layout. Please install the latest 2.5 release, availabe at http://www.phpmyfaq.de/download_old.php and then import your backup. After that just do the normal upgrade to 2.6.13 and everything will be fine.

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?

Post by Mercury »

I said I went back to 2.5.4

In the following post you say:
Thorsten wrote:Hi,

I would suggest you'll install 2.5.9, import your data and then upgrade to 2.6.13. Should be done in less than half an hour. :-)

bye
Thorsten
Where is 2.5.9? It’s not on the page you linked to. According to you that’s the latest 2.5 version.

You said that on 12/20/10. Today is 12/25/10. That’s slightly longer than half an hour. Point being that I have been working almost non stop since 12/17/10 to move my site to my new host with no success. If I fail to import my backup I can forget about upgrading.

Question: Are you saying that unless I install 2.5.(who knows what) at my new host I will not be able to import the backup I made at my original site which is 2.5.4?

Now I will have to wait another 24 hours for you to reply. Do you answer everybody like this?
www.puppylinuxforum.org
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Recreate site with just database file?

Post by Thorsten »

Hi,

it's christmas day and I offer you a present. Just sent me you server details by e-mail and I will upgrade your installation within 15 minutes.

I did upgrades from 2.5.x to 2.6.x several times and it worked everytime like described here: http://www.phpmyfaq.de/documentation.2.6.en.php#3b
Question: Are you saying that unless I install 2.5.(who knows what) at my new host I will not be able to import the backup I made at my original site which is 2.5.4?
A 2.5.x backup won't be able to restore in a 2.6 version because of the changed database layout.

So, if you like that I should do the upgrade and move to a new server for you, please send me an e-mail. This is my xmas present for you.

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