Backing up your MySQL database can be done in several ways:
- Using phpMyAdmin web interface
- Using command line through shell access
You can launch phpMyAdmin via the "phpMyAdmin" icon located on the home screen of the Quadra control panel. Click on the small play icon that corresponds to the relevant database user. The phpMyAdmin tool can export your entire database by selecting the "Export" page.
- Click "Custom"
- Under "Tables:", ensure all tables are selected
- Under "Output:", select "Save output to a file"
- We recommend selecting "zipped" or "gzipped" option for compression.
- Under "Format-specific options:", select "Structure and data"
- Under "Object creation options:", select "Add drop table" and "Enclose table and field names with backquotes"
- Then, click "Go"
You will be prompted to save the dump file on your computer.
Using mysql command line tools
To use MySQL command line tools, you would need to have shell access on Unix hosting. You can perform backup using the following command:
mysqldump -h servername -u username -p --opt -Q --routines --events --triggers databasename > databasedump.sql
To backup and compress your dump file into a gzip file:
mysqldump -h servername -u username -p --opt -Q --routines --events --triggers databasename | gzip > databasedump.sql.gz
The commands above will create the dump file in your current directory. You can download this backup file using scp or ftp for your archival purposes. If the mysqldump command is not available, please contact Quadra Hosting technical support.
Restoring MySQL Dump File
To restore your dump file / backup, please see https://support.quadrahosting.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=49&nav=0,4,11