Open craigmdennis opened 10 years ago
This is the code from inside the /staging/db_backup.sql
Sensitive information has been removed.
bash: -c: line 0: syntax error near unexpected token `)' bash: -c: line 0: `mysqldump -h{host} -u{user} -p{password} {database}'
Dunno if you solved this one, but I had the same trouble locally (OSX running MAMP)
The Grunt task wasn't able to use 'mysqldump' because it wasn't in my bash profile. If that's the case...
this is assuming MAMP is in the default location.
After adding the path line, save/exit/reset terminal. Now you have access to the command anywhere.. so that should put grunt in a position to execute properly.
I use the built in apache which is already in my bash profile. Haven't solved this yet.
Hrm, does it get as far as generating a .sql file in your backup folder? If so, what does that file contain?
I get the following error in terminal
Pulling database from 'Staging' into Local
>> Creating DUMP of remote database
>> Database DUMP succesfully exported to:
>> backups/staging/20140902/15-46-08/db_backup.sql
>> Adapt the database: set the correct urls for the destination in the database.
>> Creating DUMP of local database
>> Database DUMP succesfully exported to:
>> backups/local/20140902/15-46-08/db_backup.sql
>> Importing DUMP into local database
Warning: Using a password on the command line interface can be insecure.
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'bash: -c: line 0: syntax error near unexpected token `)'
bash: -c: line 0: `mysq' at line 1
>> Database imported succesfully
The local backup contains a full SQL dump but the remote backup contains
bash: -c: line 0: syntax error near unexpected token `)'
bash: -c: line 0: `mysqldump -h{host} -u{user} -p{password} {database}'
Where {host} {user} {password} and {database} are sensitive data.
my pull command output looks like this:
Pulling database from 'staging' into Local
Creating DUMP of remote database Database DUMP succesfully exported to: backups/staging/20140902/18-00-47/db_backup.sql Adapt the database: set the correct urls for the destination in the database. Creating DUMP of local database Database DUMP succesfully exported to: backups/local/20140902/18-00-47/db_backup.sql Importing DUMP into local database Database imported succesfully
Operations completed
Done, without errors.
What I notice different is yours has a line about 'Warning: Using a password on the command line..." then it throws an error. Can you try suppressing that warning? Maybe that's interfering with the rest of execution. Just a theory.
How do I suppress it? Is #12 related?
Suppressing it, here's some info on that:
When I run the task I get the following error:
Not sure if this is due to my system configuration or the plugin.
The error appears in the the staging .sql dumps but the grunt task says everything completes successfully. So it fails silently unless you add the flags
--verbose --debug
when calling the command.The local db dump file shows correct SQL information.