For Linux Web Hosting packages
In this article, we'll show you how to back up and restore your database using the mysqldump tool.
You need a web hosting package with shell access.
Creating a Backup of a Database
To create a full backup of your database, run the mysqldump command as follows:
mysqldump --no-tablespaces --host=dbxxxxx.hosting-data.io --user=dboXXXXXXX --password=geheimes_Passwort dbXXXXXXX > dbXXXXXXXX.sql
Please Note: If your file names, passwords, or user names contain special characters, write these in single quotation characters, such as password='password'.
A SQL dump will now be created. It is a text file containing all the data and instructions required to restore the database in SQL format.
Restoring Databases from a Backup
To restore a database from a .sql file, run the mysql command in the shell as follows:
mysql --host=dbxxxxx.hosting-data.io --user=dboXXXXXXX --password=geheimes_Passwort dbXXXXXXX < dbXXXXXXXX.sql
If the SQL dump is compressed in the gzip format, use the following command:
gunzip -c dbXXXXXXX.sql.gz | mysql --host=dbxxxxx.hosting-data.io --user=dboXXXXXXX --password=geheimes_Passwort dbXXXXXXX
Did this article help you?
Your feedback helps us to further improve our services. To leave feedback, log in to your IONOS account by clicking on the login button at the top right. You can then submit a rating below the article.