How to Restore a MySQL Database with JetBackup 5

Your website's content -- posts, pages, products, orders and settings -- lives in a MySQL database. If a plugin update corrupted it, content was deleted, or the site was hacked, you can restore the database from an earlier backup yourself. This guide shows how to restore a MySQL database with JetBackup 5 in cPanel.

Before you restore a database

  • Restoring replaces the current data. The database goes back to how it was on the backup date. Anything added since -- new orders, comments, form entries, posts -- will be lost from that database.
  • Save today's copy first. In cPanel, go to Databases > phpMyAdmin, select the database and use Export to download it. If the restore doesn't help, you can import this copy back.
  • Know which database your site uses. For WordPress, open wp-config.php in File Manager and look at the DB_NAME line. You can also see all your databases in Databases > Manage My Databases.
  • Pick the right date. Backups run three times a week and the latest 7 are kept (about two weeks). Choose one from before the problem started.

How to restore a database with JetBackup 5

  1. Log in to cPanel and go to Files > JetBackup 5.
  2. If this is your first visit, read the terms, tick the I Agree boxes and click Continue to Panel.
  3. Click Databases on the dashboard (or Restore & Download in the left menu, then the Databases tab).
  4. Tick the database you want to restore, for example exampleco_wp123.
  5. The newest backup is selected by default. To use an older one, click Choose Other Backup and pick the date.
  6. If the database user is missing too (for example, you deleted it), also restore it from the Database Users tab. When you restore only a database, only the database is restored -- not its user.
  7. Click Restore.
  8. Check the items listed, accept any restore conditions shown, and click Restore Selected Items.
  9. Click Queue in the left menu and wait for the status to show Completed.
  10. Open your website in a private browser window and check that the content is back.

Restoring a WordPress site: files too?

A WordPress site is made of files (themes, plugins, uploads) and a database. If you only restore the database, the files stay as they are now. That's usually fine for lost or broken content. But if a plugin or theme update caused the problem, you may also need to restore the wp-content folder from the same date, or restore the whole site from a WP Toolkit backup. Mixing a very old database with brand-new plugin files can cause errors.

Troubleshooting

"Error establishing a database connection" after restoring

The database user may be missing or no longer linked to the database. In Databases > Manage My Databases, check the user exists and is added to the database with All Privileges. Make sure the username and password match what's in wp-config.php. See the database connection guide for details.

My database isn't in the list

It wasn't included in any of the kept backups -- for example it was created in the last day or two. Open a ticket if you think it should be there.

The restore worked but the site still shows old content

You're probably seeing a cached page. Purge the LiteSpeed Cache (in WordPress, LiteSpeed Cache > Toolbox > Purge All) and clear your browser cache.

Can I restore just one table?

Not directly. Download the database backup instead (see the download guide), open the .sql file, and import only the part you need with phpMyAdmin -- or open a ticket and the Instant Access Internet Services team will help.

Related guides

Still stuck? Open a support ticket and the Instant Access Internet Services team will help.

Ultrafast LiteSpeed hosting from InstantAccess.net: free SSL, free backups, cPanel included, no contracts. Check out our $10/month hosting.
  • restore mysql database cpanel, jetbackup 5 database restore, restore wordpress database, database backup restore, restore database from backup, undo database changes
  • 0 Los usuarios encontraron esto útil
¿Le ha resultado útil esta respuesta?

Artículos relacionados

How to Download a Copy of Your Website Backup (JetBackup 5)

Keeping your own copy of your website backup is smart insurance, and it's the easy way to take...

How Website Backups Work on Your Hosting Account (JetBackup 5)

Every hosting account on Instant Access Internet Services servers is backed up automatically --...

How to Restore a File or Folder with JetBackup 5

Accidentally deleted a file, overwrote a page, or broke your site while editing? You can restore...

How to Restore an Email Account with JetBackup 5

Deleted an important message, emptied the wrong folder, or removed a whole mailbox by mistake? As...

How to Restore Your Whole Account to an Earlier Date (JetBackup 5)

If your site was hacked, a big change went badly wrong, or you simply want everything back the...