|
#1
|
|||
|
|||
|
I have been running a particular cronjob on a reseller account for years, but when I use the same job on a new VPS account nothing is dumped and I get this error emailed to me:
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 If I copy and paste the job exactly to terminal it runs fine and a backup is created. Here is the job: date=`date -I` ; mysqldump -uUSERNAME -pPASSWORD DATABASENAME > /home/USERNAME/sqlbackups/DATABASE_$date.sql; gzip /home/USENAME/sqlbackups/DATABASENAME_$date.sql Any suggestions? |
|
#2
|
||||
|
||||
|
I believe it should be:
-u USERNAME not: -uUSERNAME
__________________
quietFinn - netFinn Finland "Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss |
|
#3
|
|||
|
|||
|
date=`date -I` ; mysqldump -u USERNAME -pPASSWORD DATABASENAME > /home/USERNAME/sqlbackups/DATABASE_$date.sql; gzip /home/USENAME/sqlbackups/DATABASENAME_$date.sql
same error, but runs fine manually Last edited by doulos; 01-23-2011 at 07:16 PM. |
|
#4
|
|||
|
|||
|
Even though I changed nothing... it started working. We'll see if it continues.
Thanks for your time. |
|
#5
|
|||
|
|||
|
Ok, another problem. I am trying to run a backup of my public_html folder, but exclude all files in folder A, and then put the backup in folder B. As far as I can tell this cronjob does the backup but is not excluding the files and puts the backup in the root directory - and an empty file in directory B.
Can someone who knows what's what tell me how to fix this? date=`date -I` ; tar -zcf backup_$date.tgz ./public_html --exclude=/home/USERNAME/public_html/folder A > /home/USERNAME/folder B/backup_$date.tgz |
|
#6
|
|||
|
|||
|
I tried this but still doesn't exclude...
date=`date -I` ; tar -zcf backup_$date.tgz ./public_html --exclude= "/home/USERNAME/public_html/folder A" Also tried this - it didn't exclude: date=`date -I` ; tar -zcf backup_$date.tgz --exclude= "/home/USERNAME/public_html/folder A" ./public_html |
|
#7
|
|||
|
|||
|
This is a pretty good indication (usually) that you are relying on an environmental variable somewhere.
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Run php Script With CronTab | hiphil | Shared Hosting Support | 3 | 10-18-2008 12:17 PM |
| Db problem any help | jasonec | Shared Hosting Support | 3 | 02-04-2007 09:30 PM |
All times are GMT -5. The time now is 07:59 PM.










