[SOLVED] How to restore from an old CMS Made Simple DB

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
thumbsucker
Forum Members
Forum Members
Posts: 73
Joined: Thu Feb 09, 2006 1:38 pm

[SOLVED] How to restore from an old CMS Made Simple DB

Post by thumbsucker »

I have a CMS Made Simple DB that is approximately 1.5 years old.

Is there any way for me to identify which version of CMS Made Simple that it was created with, and to restore it to that version?

Unfortunately, I wiped my site clean by accident and this was the only backup I could recover.

This is an emergency request and any help would be greatly appreciated.

Thank you.
Last edited by thumbsucker on Fri Jun 07, 2013 7:14 pm, edited 4 times in total.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Emergency: How to restore from an old CMS Made Simple DB

Post by velden »

Database has a table with DB schema version (at least, that's what I assume)

Example from export:

Code: Select all

--
-- Table structure for table `cms_version`
--

CREATE TABLE `cms_version` (
  `version` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `cms_version`
--

INSERT INTO `cms_version` VALUES('36');
With that version, you might be able to determine which version(s) were installed.

To recover, you probably want to check the versions too for extra installed modules: 'cms_modules' table.

I don't know an efficient way to find CMSMS version by DB schema version. I see that in /install/schemas/extra.sql a line exists:

Code: Select all

INSERT INTO {DB_PREFIX}version VALUES (36);
In this case that's the extra.sql file of CMSMS 1.11.6 so again I assume that with a cms_version of 36 you can use CMSMS 1.11.6
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Emergency: How to restore from an old CMS Made Simple DB

Post by calguy1000 »

If all you have is the database... and you've nuked all of your files, and don't have a backup... you are in a tough spot. Depending on the site and it's content you should probably consider rebuilding the whole thing.

CMSMS does not keep a 'software version' number in the database anywhere. The only place the 'software version' is available is in the version.php file.

The database holds the 'schema version' which is different. The schema version may not change for a release of CMSMS. or it may change for a point (bugfix) release.

You will have to find the largest CMS version available with that schema value, and 'try it'. If that doesn't work properly (and "properly" is subjective to other factors such as customizations) you may have to go further down in version. Also, there is no 'map' available as to which schema version was used in which CMSMS version. So you just have to blind guess as to which version to download, expand, check the version.php file of that version, etc.

Once you have the CMS version that you will 'try'. You will also need to get the modules that were installed. This is available from the 'cms_modules' database table. You can then download these module versions from the forge, and install them.

However. If you deleted all of the files, you are still only partly done. Things that can't be restored are:
a: the .htaccess file (particularly if you had any custom rules or 301 redirects for SEO purposes)
b: Images, Videos, text files, PDF files, etc. that were linked to in the content of your pages or modules.
c: Images that were linked to in your stylesheet(s).
d: any customizations in the module_custom directory
e: custom plugins

I think you are going to be facing a very large uphill battle.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Emergency: How to restore from an old CMS Made Simple DB

Post by calguy1000 »

follow up: If you are using a hosting provider (and not self hosting your website). It would be a good idea to try to contact your hosting provider and see if they have a backup they can restore.

Some hosting providers don't provide backup services, but many do. Though it may cost a few bucks.

Even a backup from a month or so ago would be better than nothing.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: Emergency: How to restore from an old CMS Made Simple DB

Post by paulbaker »

thumbsucker wrote:I have a CMS Made Simple DB that is approximately 1.5 years old.
calguy1000 wrote:So you just have to blind guess as to which version to download, expand, check the version.php file of that version, etc.
To help, you can use this page which shows CMSMS version releases over the years:
http://dev.cmsmadesimple.org/project/files/6

1.5 years takes you back to December 2011 which, assuming you kept the site up to date, would be CMSMS version 1.10.2.

I agree with Calguy, check with your host - even if they don't make a big thing of marketing a backup service, I bet they have one.

Good luck :)
thumbsucker
Forum Members
Forum Members
Posts: 73
Joined: Thu Feb 09, 2006 1:38 pm

Re: Emergency: How to restore from an old CMS Made Simple DB

Post by thumbsucker »

I have very happy news (I think).

I was able to locate the exact duplicate of the site from 11/10/2011. Version.php states it is version 1.9.4.3

I believe it should match the version of the DB backup I have, although I am not certain.

On the other hand, I am currently running the following on my server:

MySQL Version 5.5.30-cll
PHP 5.3.24

UPDATE:

I uploaded the old CMS Made Simple files to a live domain, created a new DB, imported the old DB into the new DB, and managed to get it online.

However, trying to upgrade to 1.10.3 from 1.9.4.3 seems to break the web site and "Fatal error: Cannot override final method CMSModule::listTemplates() in /home/site/public_html/modules/Glossary/Glossary.module.php on line 1429" on Step 6.

Any idea what could be wrong?

Thank you.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Emergency: How to restore from an old CMS Made Simple DB

Post by Dr.CSS »

You may need to make sure you upgrade 3rd party modules like glossary, using module manager, before upgrading CMSMS...
thumbsucker
Forum Members
Forum Members
Posts: 73
Joined: Thu Feb 09, 2006 1:38 pm

Re: Emergency: How to restore from an old CMS Made Simple DB

Post by thumbsucker »

It worked!!!

Many thanks!!
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: Emergency: How to restore from an old CMS Made Simple DB

Post by staartmees »

Please add [SOLVED] to the subject of this thread
thumbsucker
Forum Members
Forum Members
Posts: 73
Joined: Thu Feb 09, 2006 1:38 pm

Re: Emergency: How to restore from an old CMS Made Simple DB

Post by thumbsucker »

I spoke too soon.

In the Admin menu, whenever I try to access a content page or the templates, I get the following error:

Fatal error: Call to a member function TemplateId() on a non-object in /home/site/public_html/plugins/function.stylesheet.php on line 56

Anyone know a fix for this?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Emergency: How to restore from an old CMS Made Simple DB

Post by velden »

{stylesheet} tag is deprecated {cms_stylesheet} is it successor.

http://docs.cmsmadesimple.org/tags/core/stylesheet-tag

Also depends on the version you're now running.
thumbsucker
Forum Members
Forum Members
Posts: 73
Joined: Thu Feb 09, 2006 1:38 pm

Re: How to restore from an old CMS Made Simple DB

Post by thumbsucker »

Thank you for all your help.

Site is now online!

But I'm getting this weird  character on hundreds of pages throughout the site.

Is there some global find and replace that could take care of this by any chance?

The WYSIWYG editors also do not seem to be working. I'm just seeing raw HTML. I flipped on the settings and tried both TinyMCE and MicroTiny and neither appear to be coming online. Any idea what might be the issue?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: EMERGENCY: How to restore from an old CMS Made Simple DB

Post by Dr.CSS »

The strange A has to do with DB collation or some such, you may have to run a SQL query or edit each page as some times those were other characters...

There are a few things in forum for how to get tiny back, one is to uninstall/install it, also make sure it is up to date in module manager...
thumbsucker
Forum Members
Forum Members
Posts: 73
Joined: Thu Feb 09, 2006 1:38 pm

Re: EMERGENCY: How to restore from an old CMS Made Simple DB

Post by thumbsucker »

Yeah, I tried uninstalling and installing again, but that didn't work unfortunately.

Not looking forward to looking through hundreds of pages for hundreds of 'A' characters...
thumbsucker
Forum Members
Forum Members
Posts: 73
Joined: Thu Feb 09, 2006 1:38 pm

Re: [SOLVED] How to restore from an old CMS Made Simple DB

Post by thumbsucker »

Everything was SOLVED!

Thanks everyone.
Locked

Return to “[locked] Installation, Setup and Upgrade”