- Joined
- Jan 26, 2008
- Messages
- 17,835
Well one of the more common questions I see asked here on xenfans, and also something my clients often ask me is "How do I back up my database".
In this thread I hope to provide a little mini guide which caters for most people, whether you have cPanel, or direct command line access.
With SSH access, you can simply type this into the command line:
mysqldump --opt -Q -u dbusername -p databasename > backupname.sql

If you don't have SSH access, but do have cPanel, you can also go to yourdomain.com/cpanel - choose the backup manager, and only choose the database backup option.


If you don't have cPanel, but have access to phpMyAdmin, you can simply load your database, dont click any tables, and click the "Export" button. Make sure every table is checked, and download as a sql file


Edit - For windows server users, check out this useful blog post; http://bobschwarz.com/batch-file-to-backup-your-windows-server-database/
In this thread I hope to provide a little mini guide which caters for most people, whether you have cPanel, or direct command line access.
With SSH access, you can simply type this into the command line:
mysqldump --opt -Q -u dbusername -p databasename > backupname.sql

If you don't have SSH access, but do have cPanel, you can also go to yourdomain.com/cpanel - choose the backup manager, and only choose the database backup option.


If you don't have cPanel, but have access to phpMyAdmin, you can simply load your database, dont click any tables, and click the "Export" button. Make sure every table is checked, and download as a sql file



Edit - For windows server users, check out this useful blog post; http://bobschwarz.com/batch-file-to-backup-your-windows-server-database/