Koozali.org: home of the SME Server

Backing up mysql databases

msilkjr

Backing up mysql databases
« on: December 27, 2004, 04:52:46 AM »
I have 2 mysql databases that I need to back up, How do I do that.

ergozd

Backing up mysql databases
« Reply #1 on: December 27, 2004, 12:37:20 PM »
Hi!

You can try

Code: [Select]
mysqldump -c YOURDBNAME > /path/yourdbname.sql

if it was horde you want to backup to your /opt/backups/

Code: [Select]
mysqldump -c horde > /opt/backups/horde.sql

OR even better, if you want to put a date

Code: [Select]
date=date -I
mysqldump -c horde > /opt/backups/horde-$date.sql


Best rgds, Ergin

Damian

Backing up mysql databases
« Reply #2 on: December 31, 2004, 11:57:06 AM »
To automate it have a look at http://sourceforge.net/projects/automysqlbackup/

Damian

Garfield

Backing up mysql databases
« Reply #3 on: December 31, 2004, 01:27:48 PM »
Just yesterday I installed Michel van Hees's Crontab Manager in order to create some cron jobs to perform the backups.
The backups themselves can be done via very simple sql statements from within a script.

http://www.vanhees.cc/modules.php?op=modload&name=Downloads&file=index&req=viewsdownload

Offline jeroenm

  • *
  • 18
  • +0/-0
Backing up mysql databases
« Reply #4 on: January 06, 2005, 01:38:38 AM »
Or you could do it the sme way:
- /etc/e-smith/events/actions/mysql-delete-dumped-tables
- /etc/e-smith/events/actions/mysql-dump-tables
the full dump is located in: /home/e-smith/db/mysql
...