Hello,
I'm running SugarCRM 5.5.4 on Ubuntu Server 10.04 32-bit, no GUI.
I used the FastTrack installer and performed a fresh default installation.
How can I perform daily MySQL database backups using the command line?
Thanks.
Hello,
I'm running SugarCRM 5.5.4 on Ubuntu Server 10.04 32-bit, no GUI.
I used the FastTrack installer and performed a fresh default installation.
How can I perform daily MySQL database backups using the command line?
Thanks.
use mysqldump command
Guys thanks for the replies, but when I type mysqldump in the system I get the following message:
The other way I tried this is by navigating to "/opt/sugarcrm-5.5.4/mysql/bin" and typing "./mysqldump". Then I get a promising output:Code:The program 'mysqldump' can be found in the following packages: * mysql-client-5.1 * mysql-client-5.0 * mysql-cluster-client-5.1 Try: sudo apt-get install <selected package>
However, when I type the following command in mysql/bin:Code:Usage: mysqldump [OPTIONS] database [tables] OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...] OR mysqldump [OPTIONS] --all-databases [OPTIONS] For more options, use mysqldump --help
I get the following output:Code:./mysql -u [user] -p[password] [databasename] > [outputfile.sql]
Code:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Bad path to socket.
HTML Code:./mysql -u [user] -p[password] -s[NEW SOCKET PATH] [databasename] > [outputfile.sql]
Letrium ltd. - Only high quality service
http://letrium.com
Thanks, but I tried your suggestion and this is what I get:
I tried various other destinations and I get Permission Denied for all of them.Code:-bash: /home/erez/sugarcrm.sql: Permission denied
I also tried the same command with the sudo prefix but I get the same error.
OK I found the answer
Thanks for your help guys!Code:/opt/sugarcrm-5.5.4/mysql/bin/./mysqldump [databasename] -u [username] -p[password] -S /opt/sugarcrm-5.5.4/mysql/tmp/mysql.sock > /path-to-backup-file/backupfile.sql![]()
Here's a great backup script...multiple features. You can configure & upload the two files to email backup, email errors only, store backup in folder of preference, and lots of other great features. You can add a cron job to complete the script for you.
http://www.dagondesign.com/articles/...backup-script/
Cheers!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks