About the MySQL for Sitehost data backup and restoration policy
On this page:
Overview
MySQL for Sitehost uses the MySQL Enterprise Backup features on a nightly schedule. These backups are retained for 14 days for service-wide disaster recovery purposes.
MySQL restoration policy
If you need to back up or restore your data for any purpose (development, transference from production to test, etc.), you should take advantage of the functionality and tools that MySQL Workbench offers (for example, mysqldump or Data Export and Import Wizard).
The Database Administration team will perform MySQL data restoration in extremely limited cases, such as data loss due to SQL injection or unforeseen corruption. Data restoration services are performed on a case-by-case basis and are subject to review and approval by administrators. In all cases, data restoration is limited to the previous night's updates. Binary logs are not active, and it is not possible to provide point-in-time recovery. Data restoration may take up to 48 business hours to process.
To request data restoration, contact Tier 2. Include the date and time the incident requiring data recovery occurred and the type of incident that spurred your request. You may be asked to provide information about what steps you have taken to mitigate the need for future data restoration. Staff will forward your request to the Database Administration team, who will contact you with options or further questions they may have.
Departments and owners of sites who require 24x7 data backup and restoration services are encouraged to contact the Database Administration team to discuss options, which may include creating an Enterprise MySQL instance for just that site's content and on-call data recovery services. A fee may be associated with these services.
Manually back up your MySQL for Sitehost schemas
Create a backup using MySQL Workbench
Store this backup file in a manner consistent with the data classification appropriate to your site's content. Sites which store sensitive internal or critical data must be stored in secure locations.
If you're using versions of Workbench before 6.3.8, including on IUanyWare, you will have an unhandled exception when trying to export on the new system. You will be unable to export until you update Workbench.
- Connect to your MySQL database.
- Click on the main tool bar.
- Select .
- Select the tables you want to back up.
- Under
Documents
folder in a subfolder titleddumps
.
, select where you want your dump saved. By default, it will save to your - Click Note:You may get a message about a mismatch between your
mysqldump.exe
version and the MySQL Server version. You can update your local MySQL version or continue.
.
- You now have a backup version of your site. Store this content securely in a manner consistent with your MySQL schema content's data classification.
Create a backup from the command line
MySQL Workbench has a PROCESS privilege error and fails data export. As a workaround, you can run mysqldump
from the command line instead.
- Open a command or terminal window (CMD or PowerShell on Windows, or Terminal in macOS).
- Run
ssh username@ssh.sitehost.iu.edu "mysqldump -u root_user -h host -d database name --no-tablespaces -p" > path to result file
.For example:
ssh sitehost_user@ssh.sitehost.iu.edu "mysqldump -u account_root -h mysql.uits.iu.edu -d account_database --no-tablespaces -p" > result.sql
The above example connects to the SSH server as
sitehost_user
, prompts for a password, and auto-sends a Duo push. Once the push is accepted, it prompts for the MySQL password for theaccount_root
user onmysql.uits.iu.edu
, and then writes the output to theresult.sql
file in the current directory.
Load a MySQL dump from MySQL Workbench
To load a MySQL dump file after a database failure or corruption:
- Connect to your MySQL database.
- Click on the main tool bar.
- Select .
- You should see a link to the default dump folder, typically your
Documents
folder in a subfolder titleddumps
. - Click the and navigate to where your MySQL backup file is located, select the backup you want to load, and click .
- The schema names in your dump should appear on the left-hand side, at the bottom. Select the schemas that need to be restored.
- Select on the bottom right.
This is document apnn in the Knowledge Base.
Last modified on 2024-02-01 17:01:59.