Skip to content

Taking a backup of my database

We take nightly backups of every hosting and database server. For the business hosting servers, we take an additional backup in the afternoon. So if you want to restore a certain table from your database from the backup, all you have to do is send an email to support@sre.combell.com and tell us which table from which database you would like to have restored.

Making your own backups

In addition to our nightly backups, you can of course also backup your database yourself.

Via mysqldump over SSH:

Run the following command using SSH:

mysqldump -h <server> -u <username> -p <database name> | gzip > dump.sql.gz

Your MySQL account password will be prompted, then the backup is written out as dump.sql.gz in the current directory.

Error Access denied: LOCK TABLES

When you receive an error like below, the user in question could be able to read the database but was not permitted to make changes (table locks).

mysqldump: Got error: 1044: Access denied for user 'user'@'localhost' to database 'database' when using LOCK TABLES
In order to fix this you will have to add an --lock-tables=false option to your command.