Open wolfgangschoeffel opened 10 years ago
Hi Wolfgang. Thanks for the heads up. I just fixed it, do you mind pulling again and checking?
Hi JP Lew, thank you for fixing the error. But I am afraid it is still not working for me. But don’t mind. Maybe it is a Problem with my settings. I also tried out an older version of your script. It seemed to work but then suddenly the ssh connection was lost. Now with the latest version I get this output:
./syncdb
SyncDB v0.2.2 > push
Checking if SSH connection is working...
ssh -q xxx@xxx.xxx.xx exit
Success: SSH connection is working.
Fetching local database login details...
Backing up the local database...
/Applications/MAMP/Library/bin/mysqldump -u -p -h | bzip2 -c > 140507-2112-.mssql.bz2
mysqldump: Got error: 1046: No database selected when selecting the database
Error: Database was not backed up. There is a problem with your local MySQL details. Exiting.
Can it be that there is an echo
missing on line 635?
"${l_mysqldump:-mysqldump}" "-u$l_db_user" "-p$l_db_pass" -h "$l_db_host" "$l_db_name" | bzip2 -c > "${l_bak_name1}.bz2"
Can you please try the new version I just posted? I apologize for the inconvenience, a bug slipped in where the script was failing to grep the wp-config file correctly, causing it to come up with blank values for all your DB settings. It should work now (hopefully). :)
When I try running the script (on my MacBook Pro, Mavericks) I get a syntax error: