i usually backup mysql using ssh since a year ago and no problem follow this tutorial http://wiki.dreamhost.com/Backup_MySQL,
mysqldump --opt -uusername -ppassword -h yourMySQLHostname dbname > output.sql
but since a few time ago everytime i backup using ssh putty i always get killed message and i think backup file never completed
mysql file now about 600mb
what should i do to backup now, i dont want always get killed message
Try running mysqldump "niced", and see if that helps. You can learn more about nice by looking at it's man page:
shellprompt$ man nice
hi rlparker thank you for your answer, but i still dont understand what do you mean, i am still get this problem : always get killed message when backup using ssh, the sql file is 800mb and get bigger
do you mean running query like this
mysqldump niced --opt -uusername -ppassword -h yourMySQLHostname dbname > output.sql
You are welcome, and I'm sorry you are still having troubles.
No, actually what I meant was something like this:
nice -19 mysqldump -uusername -ppassword -h yourMySQLHostname yourdbname > output.sql
i am still get killed message when backup using ssh puty using this command
my sql database are 800mb, but i get killed message when it just finished at 300-400mb, i try it 10 times but i still cannot completly finished the backup
any other suggest???
thank you before
The problem is probably that the dump takes too long an DH kills processes which run for a longer time (no persistent processes). I think you can also just dump certain tables from database using mysqldump. Maybe you could run a dump for each table in that database and split it up that way?
Promo-Code: [color=#CC0000]SAVEMONEY97[/color] - Save [color=#CC0000]$50[/color] on your first year of hosting.Get more promo codes here
Talk to the support folks about this using the web panel. They may be able to help you.
Alternatively, you may want to split up your database backups on a table-by-table basis.
Read up on using mysqldump on DH here: wiki.dreamh...MySQL#Getting_a_Backup_From_the_Shell
Your problems might be related to any number of things, I'd suggest contacting support if you don't figure it out soon.
I've been using this mysqldump script for a while without any problems. It gets activated by Cron and then I have another script to make another back-up to another machine.
# modify the following to suit your environment
# title and version
echo "My weekly mySQL_backup"
echo "* Rotating backups..."
rm -rf $DB_BACKUP/04
mv $DB_BACKUP/03 $DB_BACKUP/04
mv $DB_BACKUP/02 $DB_BACKUP/03
mv $DB_BACKUP/01 $DB_BACKUP/02
echo "* Creating new backup..."
mysqldump --user=$DB_USER --password=$DB_PASSWD --host=mysql.mydomain.com --all-databases |
bzip2 > $DB_BACKUP/01/mysql-`date +%Y-%m-%d`.bz2