Restore all bak_ files as original website data overwritten

Joomla version 1.5 is end-of-life and are no longer supported. Please use Joomla 3.x instead.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
traceylb
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat Oct 30, 2010 12:27 am

Restore all bak_ files as original website data overwritten

Post by traceylb » Sat Oct 30, 2010 12:55 am

Help!! I installed a new version of Joomla for another website and wrongly connected to a database that was already in use for an active site - now my original site is a blank page with no articles, template etc.

After a major panic attack I thought the best thing to do is export the affected database and now have a copy installed on my desktop (using WAMP) so I can hopefully fix this without messing things up more. I have no clue how to proceed and I am really hoping that I have not lost the old data as the site was just newly up running and I had not yet created a backup of the live data!

Can someone please provide the steps to follow (as simply as you can) on how I can 'rollback/restore' the bak_ files (or I am assuming these are the original files?) as I am very much a newbie with any type of SQL database.

 
User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6029
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

Re: Restore all bak_ files as original website data overwrit

Post by dpacadmin » Sat Oct 30, 2010 4:22 am

If the database has tables with a bak_ prefix then Joomla backed up the database before installing new. If the new install doesn't matter then you can just change the bak_ prefix on the tables to jos_ , just drop all the jos_ tables first. The jos_ tables are the tables the new install added.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 26577
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: Restore all bak_ files as original website data overwrit

Post by Per Yngve Berg » Sat Oct 30, 2010 2:53 pm

Do so with every table

Code: Select all

DROP jos_users;
ALTER TABLE bak_users RENAME jos_users;

I would advise to use a different prefix for your site.

traceylb
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat Oct 30, 2010 12:27 am

Re: Restore all bak_ files as original website data overwrit

Post by traceylb » Sun Oct 31, 2010 1:52 am

Thanks you both for your help and I was able to drop the jos files and rename the bak files as suggested (I will look at changing the prefix but I would just like the site up and running first). Phew...fast track way to learn PhPMYAdmin!

I made the changes on my backup version of the DB; so just to be clear now before I mess anything else up...I just import this updated DB version to the live website and it does not require any further changes?

User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6029
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

Re: Restore all bak_ files as original website data overwrit

Post by dpacadmin » Sun Oct 31, 2010 5:39 am

Do an Export of the database first, then drop all tables and then Import your update.

traceylb
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat Oct 30, 2010 12:27 am

Re: Restore all bak_ files as original website data overwrit

Post by traceylb » Tue Nov 02, 2010 1:14 pm

Thank you all for you patient assistance, it was very much appreciated and I have the website back up and running.

I will be making the suggested changes of renaming the JOS prefix in the coming weeks once things have settled down.

Cpinner
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Mar 21, 2014 2:00 am

Re: Restore all bak_ files as original website data overwrit

Post by Cpinner » Fri Mar 21, 2014 4:33 am

I see that this post is pretty old, but I'm going through the same thing. Except, my site has populated the sample data from the joomla install into it. I can still see all of my modules, template and plugins in my ftp. But I cannot get them onto my joomla site. Any ideas?

I appreciate any help!

 

Locked

Return to “Migrating and Upgrading to Joomla! 1.5”