For Web Hosting packages

To protect your data, IONOS automatically creates daily backups of your MySQL/MariaDB databases and stores them for 7 days. We will show you how to access these backups and reset your database to the state at the time of the backup whenever you need to do so.

Step 1: Downloading the Recovery File

The recovery file is a .ZIP-compressed text file in SQL format. It contains all the information necessary to recover the database in machine-readable form.

  • Log in to IONOS.
  • Click on the  Hosting tile, and if necessary, select the appropriate contract.
  • In the Databases tile, click Manage to open your database overview.
  • In the Actions column next to the database you want to restore, click the gear icon and select Restore Database from the list.
  • In the Backups drop-down menu, select the backup you want to restore.
  • Click Download Database Backup, and a restore file will be created. This may take some time depending on the size of the database.
  • Click Download and save the recovery file to your computer.

Step 2: Restoring the Database with phpMyAdmin

To restore your data, import the restore file you downloaded into the desired database using phpMyAdmin:

  • In the Final steps for recovery with phpMyAdmin section below the Download button you used to save your backup, click the phpMyAdmin link. If you already closed the Download window, you can also see the article Opening phpMyAdmin.
  • Click on the database name in the top-left corner to select your database.
  • Click on Import in the menu bar.
  • In the File to Import area, click Browse and select your restore file.
  • To start the import and restore your data, click Go.

Please Note

Usually, importing through phpMyadmin will work without any problems. However, with large import files and depending on the general system load, it is possible that the process terminates with a timeout error. If this error occurs repeatedly, we recommend that you try to restore the database using SSH.

Restoring Databases through SSH

If recovery via phpMyAdmin is not possible - or you prefer the Linux command line over phpMyAdmin - you can also recover your database via the SSH access of your package.

Please Note

  • In the following steps, we assume that you have created a restore file for the desired period in your IONOS account. If you have not, first follow the instructions in Step 1: Downloading the Restore File above to create it. In this case, you do not need to download the file since a copy will automatically be saved to your webspace when you create the file.
  • After you have created the recovery file, you will already see the command at the bottom of the page that allows you to recover your database on the command line. You will need this command in the rest of this manual. For this reason, we recommend that you remain logged in to your customer account for future reference. If you have already logged out, you can view this information again at any time by selecting the Restore Database option in your database overview again.

To restore your database via your SSH access, proceed as follows:

  • Connect to your webspace via SSH and you can now enter commands on the command line to manage your database.
  • To change to the directory of the restore file, enter the following command: cd _ProviderRestore_db########

    Replace the placeholder ######## with the name of your database and press Enter.

    Example:

    cd _ProviderRestore_db12345678

  • To restore your database, copy the command shown in your IONOS account and paste it into the command line. Enter your database password in the space provided. To start the restore, press Enter.

    Example:

    gunzip -c db123456789_2020-09-17.sql.gz | mysql --host=db123456789.hosting-data.io --user=dbu123456789 --password=Zoteb%Ipayu612 db123456789

    Your database will now be restored. This may take some time depending on the size of your database. No additional commands are possible while the recovery is running.