1
Skythe
Getting my hacks and database back?
  • 2005/1/22 14:10

  • Skythe

  • Just popping in

  • Posts: 99

  • Since: 2004/7/2 2


Hi there

We've switched hosts some time ago, and I cant get XOOPS to work with the sql backup I made on the old database/server.

1. I've installed XOOPS (2.0.9.2, not the version we were using before) and it works fine. But when I import the sql backup, it stops working. No error messages, it just wont display anything but a blank screen.
I've changed and customized lots of XOOPS files of my old installation (the one the database backup is from), could that be the reason? That the old db is in some way different because the old files looked different?

2. Problem #2: I've edited a good number of files in /modules, /class, /include, and dunno what else. Can I just copy paste all XOOPS folders from my customized XOOPS installation into my new and untouched Xoops? Which files or folders shouldnt I overwrite? The mainfile.php would be one Id guess?

Thanks for any help

2
jdseymour
Re: Getting my hacks and database back?

Through what method did you backup your database? And by what method are you trying to restore?

3
Skythe
Re: Getting my hacks and database back?
  • 2005/1/22 14:27

  • Skythe

  • Just popping in

  • Posts: 99

  • Since: 2004/7/2 2


To backup I used a) the backup module you can download somewhere on this page and b) the Export feature of phpMyAdmin. So I got 2 .sql files now and they both return the blank screen.

After XOOPS was installed I created a database with the same name as the old one (just in case that name was still mentioned in one of the customized files) and went SQL -> Use text file

4
jdseymour
Re: Getting my hacks and database back?

OK. For restoring a database with PHPmyadmin see my extension to this faq Here.

I have a complete article on my site: Xoops Site Migration

I just did this last weekend. The main problem with PHPmyadmin is the script timeout error with large SQL files.

You will probably have to adjust your options since you have a usable database to prevent data loss. Make sure that you do a recent backup just in case there is problems.

As far as your hacks go, you will have to view a changelog and make sure none of your hacked files have changed with the most recent release. If they have I would not overwrite them, if they are the same I see no problem.

5
Skythe
Re: Getting my hacks and database back?
  • 2005/1/22 17:07

  • Skythe

  • Just popping in

  • Posts: 99

  • Since: 2004/7/2 2


Quote:

jdseymour wrote:
OK. For restoring a database with PHPmyadmin see my extension to this faq Here.

I have a complete article on my site: Xoops Site Migration

I just did this last weekend. The main problem with PHPmyadmin is the script timeout error with large SQL files.

You will probably have to adjust your options since you have a usable database to prevent data loss. Make sure that you do a recent backup just in case there is problems.

As far as your hacks go, you will have to view a changelog and make sure none of your hacked files have changed with the most recent release. If they have I would not overwrite them, if they are the same I see no problem.


The db backups are 1 to 1.3 Mb (43 tables the oldest) :( PHPmyadmin did say "Your SQL-query has been executed successfully. The content of your file has been inserted. (7024 Instructions)"

This time I didnt create a new database beforehand but just imported the sql file because otherwise it would sometimes tell me database xxx already exists. Everything went perfect too until the XOOPS installation reached the database check and it said "Tables for XOOPS2 already exist in your database" -.- So its #1 set up database #2 install XOOPS #3 restore db? But then I'll have to use another backup cause that specific file seems to have a create db command included... im so lost


How should I go about testing the database backups anyway?
Should I just use the default 2.0.9.2 installation? Doesnt it matter that the backups are from a previous version and base on altered files?

Thanks a bunch i mean it

6
Bender
Re: Getting my hacks and database back?
  • 2005/1/22 17:35

  • Bender

  • Home away from home

  • Posts: 1899

  • Since: 2003/3/10


Quote:
2. Problem #2: I've edited a good number of files in /modules, /class, /include, and dunno what else. Can I just copy paste all XOOPS folders from my customized XOOPS installation into my new and untouched Xoops? Which files or folders shouldnt I overwrite? The mainfile.php would be one Id guess?


This sounds like you are still in posession of your old files.


Why don´t you just

- delete everything,
- copy all the old files to the new server,
- restore the database

and then start updating by using the regular patches?

7
Skythe
Re: Getting my hacks and database back?
  • 2005/1/22 17:42

  • Skythe

  • Just popping in

  • Posts: 99

  • Since: 2004/7/2 2


I've got an idea.

As I still got the hacked files, theme, css and templates getting the old look back shouldnt be much of a problem.

Now the content. I'm going through the admin preferences right now so I wont need the db backup for that. I need some chunks from it tho: users, news posts, forum posts. Getting the blocks back would be nice, but I could rewrite them by hand.

So here's the idea: I create a dummy db, upload the backup there and extract the parts I mentioned above. This is where you come into play to tell me if its possible and how to do it.

8
Skythe
Re: Getting my hacks and database back?
  • 2005/1/22 17:45

  • Skythe

  • Just popping in

  • Posts: 99

  • Since: 2004/7/2 2


Quote:

Bender wrote:
Quote:
2. Problem #2: I've edited a good number of files in /modules, /class, /include, and dunno what else. Can I just copy paste all XOOPS folders from my customized XOOPS installation into my new and untouched Xoops? Which files or folders shouldnt I overwrite? The mainfile.php would be one Id guess?


This sounds like you are still in posession of your old files.


Why don´t you just

- delete everything,
- copy all the old files to the new server,
- restore the database

and then start updating by using the regular patches?


edit: wouldnt updates overwrite my hacked files?

9
Skythe
Re: Getting my hacks and database back?
  • 2005/1/22 18:00

  • Skythe

  • Just popping in

  • Posts: 99

  • Since: 2004/7/2 2


I just did what Bender said.

At first it crashed of course. Because the mainfile still had the old root path and URL in it. I changed that and now any error messages concerning the mainfile are gone. There is one error left:

Fatal error: Class 'XoopsTpl' not found in header.php on line 63

Sad thing is, line 63 says:
$xoopsTpl = new XoopsTpl();

??

The db looks good so far btw. PMs, users, blocks, posts, avatars all there. If it wasnt for that silly header.php

10
Skythe
Re: Getting my hacks and database back?
  • 2005/1/25 13:02

  • Skythe

  • Just popping in

  • Posts: 99

  • Since: 2004/7/2 2


anyone? :/

Login

Who's Online

318 user(s) are online (284 user(s) are browsing Support Forums)


Members: 0


Guests: 318


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits