Database backup in localhost - checking backup

Avatar
  • Answered
Am using Prestashop 1.4.8.2 and it says in BO that backups should be checked and verified even if the program says it was successfully backed up. I thought a good way to do this would be to import it into localhost/Wampserver where I built the site.

None of the product ads I've written since going live are showing up.

Do the backup files need to be converted into ?? I've tried putting the info into Excel. Didn't work. Suspect there is a step or 2 which I might be missing -- or is the fact that the online database has a different name than localhost interferring?
Avatar
JacobIMH
Hello dpass2038, and thanks for your question. The database you'd be backing up would be a MySQL one, so you would need to import it, into your local MySQL server. This is the M from WAMP (Windows Apache MySQL PHP) that you're running. If you followed one of our guides along the lines of creating, importing, and exporting MySQL databases, then you should have ended up with a raw .sql file. Unless you compressed it into either a .zip or .tgz archive. If it is still archived in a compressed file, you'll want to first extract that. Then you need to import the .sql file into your local MySQL server. Your database name from our server is going to be your username followed by the database name, so something like userna5_shop. You'll probably want to create your local database with the same name, and create the same database user and password from our server as well, otherwise you will have to update your settings.inc.php config file accordingly. However an alternative to this would be creating a new database on our server via cPanel, following that same guide above. Then you could make a database backup of the main database, restore it to the new database you created, and finally you could use phpMyAdmin on our server to manually inspect the restored database for integrity. You could even go so far as to assign the same MySQL database user that you're using for your main database, to the new database. That would be done in cPanel by going to MySQL Databases under the Databases section. Then at the very bottom, there is a drop-down for Add User To Database you can use. If you did that, you could temporarily update your config file to point to the new database, only having to change the _DB_NAME_ section. Then visit your website, and if there aren't a bunch of database errors or missing content, then you should be pretty confident that the .sql database backup was a good one. I hope that information was helpful, if you had any other questions at all please don't hesitate to ask. - Jacob