![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Redhat linux command to check Version | bache_gowda | UNIX for Dummies Questions & Answers | 1 | 03-22-2007 11:09 PM |
| Loading values into a MYSQL database | kshelluser | Shell Programming and Scripting | 2 | 12-05-2006 11:10 AM |
| command(s) to find size of mysql database? | sbourgeois | UNIX for Dummies Questions & Answers | 4 | 06-11-2006 09:40 PM |
| mysql installation error using redhat 7.2 | theDirtiest | UNIX for Dummies Questions & Answers | 6 | 11-15-2001 12:41 PM |
| mysql in redhat | gparsons70 | UNIX for Dummies Questions & Answers | 13 | 10-31-2001 03:10 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
MYSQL command to take a backup of the database in Redhat linux 7.2
I am new to mysql database ,
we have a mysql database running on linux , and we use mysql database for bugzilla, so we wanted to take a backup . what is the command for taking the entire database backup from the command prompt with all options. Thanks in advance Bache Gowda |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Hi,
Use the mysqldump command... The argument for a full backup is -A... do mysqldump --help. |
|
#3
|
|||
|
|||
|
Quote:
I userd the command to take backup us mysqldump -A -p --password=***** >back.sql backup.sql file created but file having lot of junk character. How to make sure? Bache Gowda |
|
#4
|
||||
|
||||
|
It's not suppose to have "junk", because it's a text file... maybe the command is corrupted or you have some weird data on your tables...
Use mysqlcheck to check your DBs before the dump... |
|
#5
|
||||
|
||||
|
Here is a way to email a backup using bash, perl, and crontab.
mysqlbackup Code:
#!/bin/sh mysqldump -uroot -ppwd --opt db1 > /sqldata/db1.sql mysqldump -uroot -ppwd --opt db2 > /sqldata/db2.sql cd /sqldata/ tar -zcvf sqldata.tgz *.sql cd /scripts/ perl emailsql.cgi emailsql.cgi Code:
#!/usr/bin/perl -w use MIME::Lite; $msg = MIME::Lite->new( From => 'mysqlbackup@yoursite.com', To => 'you@yoursite.com', Subject => 'sqldata.tgz MySQL backup!', Type => 'text/plain', Data => "Hi You,\n MySQL database backups."); $msg->attach(Type=>'application/x-tar', Path =>"/sqldata/sqldata.tgz", Filename =>"sqldata.tgz"); $msg->send; 0 2 * * * * /myscripts/mysqlbackup |
||||
| Google The UNIX and Linux Forums |