b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Installation / Upgrade
  3. Moving your b2evolution Site
  4. Restoring a database backup

Restoring a database backup

A database backup is typically an SQL file with a name like b2evo_db_dump.sql or b2evo_db_dump.sql.gz. The .gz at the end means the file is compressed with gzip.

If you want to restore such a backup on your existing (in case of a disaster) or a new (in case you’re moving your site) server, there are several ways:

  • If you are not a technical person, ask your web host to do it for you. This is the easiest way.
  • Use the cPanel / phpMyAdmin web interface to restore the database.
  • Use the command line mysql tool. This is the most robust way but requires shell access and is for tech savvy people only.

Before restoring the database, you will need to have an existing (even if it’s empty) database to restore to. The restore process will fill up that database. So before you try to restore, make sure you have created a new database on your server. You can do so using the cPanel / phpMyAdmin web interface provided with your hosting account.

Command line

If you have shell access, and once the file is uploaded on your server.

If it is a .gz file, you can uncompress it like this:

b2evo_db_dump.sql.gz

You can restore by using a command line like this one:

 mysql -u MYSQL_USERNAME -p -h MYSQL_SERVER_ADDRESS DATABASE_NAME < b2evo_db_dump.sql

Potential MySQL errors

#1046 - No database selected

This means that:

  • either you have not created a database yet and the restore process is trying to restore to a non existing database ;
  • you have misspelled the name of the database ;
  • you have not specified a target database to restore to at all .

You may want to open your .sql file and check if it has a line like this near the beginning:

USE `b2evo_db`;

Make sure the name ‘b2evo_db’ actually matched the real name of the database you are trying to restore to.

Created by fplanque • Last edit by fplanque on 2020-06-09 00:25 • •

No feedback yet

On this page

  • Command line
  • Potential MySQL errors
  • #1046 - No database selected

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
    • New Installation
    • Upgrade
    • Configuration files
    • Advanced Setup
    • Migrating from Another System
    • Moving your b2evolution Site
      • Moving to Another Server
      • Restoring a database backup
      • Moving to Another Folder
    • FAQ & Troubleshooting (Installation / Upgrade)
    • Assumed User Skills
  • Front-office Reference
  • Back-office Reference
  • Developer Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
  • Archives
Free blog engine

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque