DeskNow Knowledge Base
 
      
Home Backup and migration How to backup the MySQL database

How to backup the MySQL database

The easiest method is to use a free utility available on www.mysql.com, called MySQL Administrator. It can perform backups and restores from a graphical interface, and also schedule backups. (Tip: in the backup options, choose 'InnoDB online backup' and enable 'Complete backup')

 

An alternative method is to do it via command line. It is detailed below.

Backup

  1. type the following command:

    mysqldump --user=desknowserver --password=password --single-transaction --skip-opt --add-drop-table --add-locks --create-options --disable-keys --extended-insert --quick --set-charset desknow > /var/backup-desknow.sql
     
  2. this will generate a sql file with all the commands to recreate the database

Restore

  1. re-create an empty desknow database, following the instructions in DeskNow's documentation
  2. open the console (command prompt) in c:mysqlbin
  3. type the following commands:
    mysql --user=desknowserver --password=password desknow
    SET FOREIGN_KEY_CHECKS = 0;
    SOURCE /var/backup-desknow.sql
    SET FOREIGN_KEY_CHECKS = 1;

 

Email Article Email
Print Article Print


How helpful was this article to you?
Related Articles
article How do I make the DeskNow service start after the database server?
This article applies to Windows environments...

  May 27, 2004    Views: 46202   
article How to backup the PostgreSQL database
Linux/Unix Backup: pg_dump -U desknowserver...

  October 6, 2004    Views: 49562   
article Performance tuning for MySQL database
By default MySQL is installed with very...

  April 11, 2006    Views: 4071   



Powered by Lore :: (c)2003 Pineapple Technologies.