In this part of the series we’re going to restore a broken site using BackupBuddy. I’m just going to leave the file where it is. But we’re going to break the daylights out of this site so you can see the restore process.
Come over here back to Bluehost and we’re going to delete entirely wp admin. Oh no, I was in eStore 5 when I did that. That’s something you don’t want to do. I just killed eStore 5. Oh well, that’s okay. We’ll come over here to this wp admin and delete it. And then we’re going to go over to the database and we’re going to delete a crucial set of tables. We’re going to delete the wp options table and then we’re going to try and see this site. And it is dead, dead, dead.
No way to get to the back side, no way to get to the front side. The website is completely dead and we’re going to have to restore it without having anything immediately at our disposal to do so.
Steps to Take After a Manual Backup
I just realized I messed this up because when you perform your manual backup, you are supposed to give yourself a copy of importbuddy.php and download that backup and then store them someplace safe.
Importance of Having an Organized System for Storing Backups
One of the things I run into when people are panicking and having problems is they don’t know where their backups are because they don’t have an organized system for storing their backups. They just have stuff sitting around randomly.
Step 1 Find Your Backup Files
I strongly advise you to set up a folder system to store your backups and use descriptive names for those folders so you know which site’s backup it is and you have relevant information associated with that. That’s a critical of this is being able to know where your backups are. After you go through all the process of doing the backup you need to know where your backups are which is really step 1 of how to recover from this. You need to find your backup files.
On Your Computer
If you had downloaded this to your computer, for example, here’s the backup of byobtutorial.com and this is the Import Buddy from that same thing I just… I didn’t tell you about. But this is that old one that was too big that had the extra stuff in it. And then there’s a copy of importbuddy.php from this site. You need to assemble these things so that you know where you can find them.
At a Remote Location
Now if they are stored in a remote destination, you just need to remember where those are. The system will actually give you the ability to choose here in just a minute.
Backup Left on the Server
But if you’re backing up from the one you just created and you didn’t download it to your computer first, then you just left it on the server which is probably likely to happen. Let’s pen up C Panel, go into the file manager and go to where your website is located. And then come down here to wp content and open up wp content and then open up uploads. And here are your Backup Buddy backups and wp uploads.
You can see the two backups that I did, the 25 MB one and the 47 MB one. We’re going to move this 25 MB one. So right click on it and say move and we’re going to move it directly into public HTML because that’s where we’re going to install this. And it’ll ask you if you wanted to delete the file, say cancel. But then move the files to public html.
So now we have our backup where we want it. And actually that was the critical part, knowing where to find that backup. Find the backup in wp content, uploads, Backup Buddy, backups.
Step 2 Locate Your Database
The other thing you have to find is your database. If you’re anything like me… well, you’ve got a whole bunch of databases and most of them have weird names. If they were all automatically created, they’ll have word1, word2, word3… so on and so forth, right? So I’ve got 51 databases in this hosting account and I need to figure out which one of these 51 databases is the actual database for this.
The way you do that is in File Manager. Go to where the website is and scroll down until you find your wp config file and edit your wp config file. I’m not actually going to edit it but you are going to find it because right off the bat, it says the database user is byobtutomain and the database password is this and the database host is that.
If you just copy that and paste that into a text file so that it’s available to you during the restore process, that will be useful. You need the name, the username, the password and the host name. And once you’ve copied that, you just go ahead and close it because you’re not actually going to make the edit.
Step 3 Preserve Existing Files
So now you know where your database is. Now we want to preserve all the existing files that we have for this site. And we’re going to preserve all of these existing files by moving them into a zip file.
In this case, it’s wp content, wp includes and really, I’m just going to take all the rest of the files all the way down to the bottom here. So select all of those. Make sure there’s nothing else up there. Then I’m going to come over here to compress it into a zip archive. I’m just going to call this backup or toss backup because we’ll throw this away once the restore works. But we don’t want to throw anything away until we know we’re there.
Step 4 Organize the Files in File Manager
So I’ve put it all into that, compress the file. We’re going to preserve our existing files and we’re going to preserve our existing data and then we’re going to restore.
If we come back down here again, now we’re just going to dump this data, right? WP content, wp includes… I’m going to come all the way down here to the bottom and then make sure I take out of this that zip file which was backup toss, right? Well, let’s reload this here because I don’t see backup toss anywhere. Oh toss backup, there it is, okay.
So again, we’ll come back down to wp content, all the way down there. Select those and then toss backup. We’re going to deselect and then we’re going to delete all these files because all those files will be in the way when we do our restore. Except I just deleted our backup.
That was the other you’d want do. Before you delete that, just make sure you don’t delete the backup. So this we’re going to extract. That’s comedy. This is why you do this, right? You save everything. You don’t want to delete anything until you know you don’t need it.
I’ve got all this back. My toss backup zip stayed so now I can come back down here and select all these things. Deselect toss backup and deselect the backup that we’re going to be using to restore. This is the one we are using to restore. Delete all the rest.
Upload Import Buddy File
I’ve got my toss backup zip and I’ve got my backup file there. Now I’m going to upload the Import Buddy file so I have to go to choose it. I have so many copies of Import Buddy in this place in the Downloads folder that it had 17 or it had 16 copies already so it added 17 to my latest one.
I’m going to have to rename that once I get it up to my server. Okay, that says that’s complete. Now we’ll take importbuddy.php and rename it to get rid of that extra space or get rid of the number because it needs to be named importbuddy.php. That has to be the name of this file.
Now we’re going to go preserve our database. So we come back over here and we discover that our database name was byobtutomain so we are going to find that here. And we don’t know if it’s damaged or not so we don’t want to delete it yet. So we’re going to check everything and then we’re going to come over here to export and we’re going to do a quick export.
We’re not going to save it on the system. We’re going to save it on our computer. So this will save the database and then we’re going to come back over to the database now that we’ve saved a copy of it. Check all of them again and then we’re going to delete all of the entries. So we hit drop and say yes and say go. Well no, cancel. Just say drop and yes. Okay so now I have absolutely no tables in the database. The database is still there but there’s nothing in it.
Recap of the Preparation to Restore a Broken Site
What we’ve just done is we’ve located our backup files. We’ve identified our database. We’ve preserved our existing files. We’ve preserved our existing data then we’ve dumped the existing files and the existing data. And then we’ve moved the backup files to their installation location which is, of course, right here. This is the installation location.