Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: msilkjr on December 27, 2004, 04:52:46 AM

Title: Backing up mysql databases
Post by: msilkjr on December 27, 2004, 04:52:46 AM
I have 2 mysql databases that I need to back up, How do I do that.
Title: Backing up mysql databases
Post by: ergozd 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
Title: Backing up mysql databases
Post by: Damian on December 31, 2004, 11:57:06 AM
To automate it have a look at http://sourceforge.net/projects/automysqlbackup/

Damian
Title: Backing up mysql databases
Post by: Garfield 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
Title: Backing up mysql databases
Post by: jeroenm 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