Auto Backup: restoring a file

5 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: May 26, 2011   (RSS)

By gversion - May 26, 2011

Hello,

I have tried to restore my database by importing the file that the Auto Backup plug-in script has created directly into phpMyAdmin. For example the following file is being imported:

cms-v2.06-hourly-17.sql.php.gz


The result is all the tables being successfully imported but with the table prefix as:
#TABLE_PREFIX#_


So for example, the following table names are created:
#TABLE_PREFIX#_accounts
#TABLE_PREFIX#_categories
...
#TABLE_PREFIX#_uploads

Is there a setting somewhere in the script for me to define what the table prefix should actually be or do I just need to rename the tables manually?

Thinking about this more, perhaps this has been done on purpose to avoid overwriting the original tables? Or is it a bug in the script? :)

Thanks for your help guys.

Greg

Re: [gversion] Auto Backup: restoring a file

By Jason - May 26, 2011

Hi Greg,

We use TABLE_PREFIX to allow you to have more than 1 CMS Builder installation use the same database without data getting mixed up between the two. By default, the table prefix is cms_. You can find out what you table prefix is by looking at General Settings.

The backup script creates a file that is only meant to be restored through CMS Builder in General Settings. This is the recommended way of restoring your CMS Builder databases.

Is there a reason why you need to restore this directly through phpMyAdmin?

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [gversion] Auto Backup: restoring a file

By Jason - May 26, 2011

Hi Greg,

Your table prefix doesn't change. You only have 1 table prefix for each installation. CMS Builder takes care of handling the table prefix, so it isn't something you need to worry about.

However, if you do a restore through CMS Builder, you WILL overwrite all of the data currently stored for that installation. The restore script first empties out your tables, then re-populates them with the data in the backup file.

If you log into CMS Builder, go to General Settings, you'll see a section with a list of your current backup files. You can select 1 and hit restore to restore that data.

Hope this helps clarify.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Auto Backup: restoring a file

By gversion - May 26, 2011

Hi Jason,

Very useful to know. Thanks so much for explaining how that works.

Regards,
Greg