Solved

Cron Backup Job - mysqldump

Posted on 2011-03-13
2
759 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
simple mysql statement 3 32
selecting date modified field from a table 2 39
Whether to use true/false, yes/no or 0/1 11 51
Amazon Redshift 2 26
In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now