Solved

Cron Backup Job - mysqldump

Posted on 2011-03-13
2
762 Views
Last Modified: 2012-05-11
I have a job scheduled to run daily, but it doesn't look like it's working, I didn't have to enter my password anywhere in here, that maybe the problem.
mysqldump -u root -p forumdb | gzip > /home/domain/public_html/_db_backups/forumbackup.sql.gz

Open in new window

0
Comment
Question by:N R
2 Comments
 
LVL 77

Accepted Solution

by:
arnold earned 250 total points
ID: 35123750
-p password will prompt the user for password the correct switch use with -p is -ppassword you can also use --password="password"
If you run the command:
mysqldump -u root -pforumdb | gzip -c > /home/domain/public_html/_db_backups/forumbackup.sql.gz
or
mysqldump -u root --password="forumdb" | gzip -c > /home/domain/public_html/_db_backups/forumbackup.sql.gz
0
 
LVL 19

Assisted Solution

by:jools
jools earned 250 total points
ID: 35124053
or mysqldump -u root -prootpassword forumdb | gzip -c >  /home/domain/public_html/_db_backups/forumbackup.sql.gz

there is no space after the -p for the password and you still need to specify the database.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question