FAQ #912
Artikel editieren
Artikel weiterleiten

This is how easily you can access a backup of your MySQL database via SSH.


Backups are necessary - whether hourly, daily, or weekly. In addition to your files and directories, STRATO also backs up your MySQL databases (starting with version 4.x).


The creation of these backup copies takes place automatically in the background with Backup Control and the intelligent storage architecture.

The MySQL Backup from STRATO will be available to you and allows you to independently access the backup copies of your databases - made at multiple points in the past!
With the help of our MySQL Tool, you can log in to a past image of your database and have read access to it; i.e. this means "queries" can be settled or you can save a dump (backup) of your database in a file on your web space.

You only need an SSH program to access the backup copies.


After establishing connection via SSH with the free PuTTY program, the mysqlbackups tool is available, which shows you a list of available backups.


In the following, we show you how you can access your database backup files via PuTTY.

Beachte auchYou can download PuTTY here


Start PuTTY
You will see the following window prompting you to enter your data:

Please enter ssh.strato.de as your host name.

When the connection to the server has been established, your login name and password will be requested.


Enter a domain from your package as the login name, for example desiredname.com. . Confirm the entry by pressing the [ENTER] key. Enter your master password that you assigned in the customer service area as the password. The password is not displayed during input.


hinweisWhat is the master password and what is it needed for?


Note: : If you received an error message while logging in through SSH or the PuTTY program window simply closes, please check if you input your access data correctly.


If the data is correct and the login still does not work, please check the SiteGuard settings as well in your password-protected customer service area.


hinweisWhat is STRATO SiteGuard and how do I set it up?

If you have successfully logged in, your domain name will appear in the next line, followed by an "angle bracket", which means that you can execute "commands". Enter the following command after it to call up the MySQL monitor:


You can now display the list with the available backup names with the command mysqlbackups followed by your database user name Uxxxxxx.
The required information for your database can be found in your password-protected Customer Service Area.
hinweisThis is how you can use our MySQL database
Enter, for example, the following in the command line:
mysqlbackups U123456

You will now receive a list with all of the available backups in the form mysql_[DATE]-[TIME].
If you would like to write the dump of an existing backup to a file on your web space, please enter the following command:
mysqldump --add-drop-table -h mysql_[DATE]-[TIME] -u [user name] -p [database name]> [file name].sql
This command creates a file with the content from the database backup and saves this on the topmost level of your web space.
Example: You would like to save the backup from 11/5/2009 in a file by the name of sqlsicherung.sql on your web space. The name of your database is "012345".

The command would then be as follows:
mysqldump --add-drop-table -h mysql_05.11.2009-16:00 -u U012345 -p DB012345> sqlsicherung.sql
After you have pressed [ENTER] you will be asked to enter the password for your database.
Here, you need the database password that was valid at the time of the backup.
Please remember that your password may not be visible when entered, but it will be accepted. As soon as you have entered your password for the database and pressed the [ENTER]-key again, the cursor will blink for a few seconds (the file is being saved at this time) and then you will again receive an input prompt. An additional confirmation will not be displayed.
After this, you can also directly display the content of your web space via SSH (with the command Is). You therefore have the opportunity to check immediately if the file was saved.
You can normally recognize a file name by the extension after the name (for example: .html, .php, .sql).
For a sub-folder, usually only the name of the folder is displayed.

In the following article, you will find out how you can now restore the backup:
Beachte auch How can I restore a backup of my database (*.sql file) via PUTTY or write my *.sql file to the database?
Note: Please remember that tables of type InnoDB, which is used in e.g. CMS Joomla, are not always consistently saved in the STRATO backup of your MySQL databases. In this case, we recommend creating a backup with phpmyadmin.