Post by uksitebuilder » Tue Apr 11, 2017 2:48 pm

The easiest way is to only backup those tables separately - Yo ucan then restore them easily when needed

Obviously do a full backup as well

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by uksitebuilder » Tue Apr 11, 2017 3:56 pm

In your admin - System - Tools - Backup/Restore

Place a tick in the checkboxes against the tables you wish to backup, or untick the ones you don’t want. Use the 'Select All' / 'Unselect All' links to assist in selection

Then hit the export button (the one with the arrow pointing down).

--

To restore, browse for a backup file by hitting the browse button, then click the import button (the one with the arrow pointing up)

--

If your host offers a backup / restore feature, I would advise using that for the main backup of everything. Some hosts do this automatically for you on a daily basis.

--

When installing new modules/extensions, I advise you to backup everything prior to installation, should something go wrong, you can always restore easily.

If you have root access, install AutoMySQL Backup if you can, it stores a daily backup, weekly backup and monthly backup.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by uksitebuilder » Tue Apr 11, 2017 5:08 pm

OpenCart's backup / restore only truncates (empties) the existing table and inserts the data back in to the empty existing table.

Hopefully you still have the opencart backup of those tables you deleted via phpmyadmin

Which tables were they and what version of OpenCart are you using ? I will send you the SQL to run in phpmyadmin to recreate those tables once I know which ones.

You will need to recreate those tables and then restore the opencart backup you made.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by uksitebuilder » Tue Apr 11, 2017 6:03 pm

If you can use phpmyadmin, then yes, that is a better option.

Regarding your current database. If you have a full OpenCart backup of it, then you just need to recreate the tables first.

After that you can try the restore again via OpenCart admin.

Give me a minute and I will generate the create table SQL for oyu.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by uksitebuilder » Tue Apr 11, 2017 6:07 pm

Import the attached via phpmyadmin import on your database

That should recreate the tables you dropped

Unfortunately, if you added any extensions that created their own tables, they will be missing.

After importing, you should be able to also import via phpmyadmin the backup you did from OpenCart

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by uksitebuilder » Tue Apr 11, 2017 6:33 pm

That should work, yes

Either that or edit your backup and remove the code for the oc_blog_article (truncate section and it's inserts (if any)).

You will probably have to rinse and repeat this for other non-standard tables

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by uksitebuilder » Tue Apr 11, 2017 6:55 pm

Just to reiterate

If you were just to use the OC Backup/Restore function, it would have been fine.

The problem came from dropping the tables via phpmyadmin

OC's Backup/Restore does not export table structure only the data in the tables is backed up/restored

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by paulfeakins » Tue Apr 11, 2017 7:09 pm

Cre8tor wrote:
Tue Apr 11, 2017 12:36 pm
But what if I just wanted to restore one part of the database, like oc_information_description or oc_settings ? Is it possible? If so, how? And would it be risky to mess with just parts of the database like that?
Yes it would be risky! Why? Because tables are not stand-alone separate entities, they are relational and therefore have relationships to each other.

If you do not understand relational database theory do not try and replace only certain tables individually!

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by uksitebuilder » Tue Apr 11, 2017 7:31 pm

Certainly journal would have created tables in the database and also added settings to the settings table , etc

Ideally you should restore back what you had there initially and then look at uninstalling the journal theme as per their uninstall instructions after everything is up and running again.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom
Who is online

Users browsing this forum: No registered users and 2 guests