From: DeskNow Knowledge Base
http://www.desknow.com/kb/

How to backup the MySQL database
http://www.desknow.com/kb/idx/9/013/article/

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. In this example, the file would be saved as /var/backup-desknow.sql

Restore

  1. enter the mysql console (example: mysql -u root -p but this may depend on your MySQL installation)
  2. re-create an empty desknow database
    1. create database desknow character set utf8;
    2. grant all privileges on desknow.* to desknowserver@localhost identified by 'password';
    3. grant all privileges on desknow.* to desknowserver@'%' identified by 'password';
  3. exit the mysql console ( type \q  and press <enter>)
  4. 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;