Using mysqldump on remote server in rsnapshot returns code 127 while the very same command used locally works fine
0
votes
1
answer
84
views
As said in the title, I want to backup my remote mysql database with rsnapshot, using mysqldump. I don't have any syntax error, but get a "WARNING 'command" returned 127", and the sql file is not written. Here is what I tried:
backup_exec LeBear:"/usr/bin/mysqldump -A lebearcnc > /var/mysql-dumps/mysql.sql"
and
backup_exec LeBear:"/root/mysql-script.sh"
I also tried with --single-transaction and the database name instead of -A, but all different syntax attempts trigger the same warning/error.
"LeBear" being the host name in my /root/.ssh/config file, where the username is root. Connection is without password, as I have ssh keys. When I pass either of these commands on the remote host command line "LeBear", they works just fine, meaning the sql file is properly written. Mabe I should add that I don't have any ssh problem using the config file.
I would expect to get mysqldump to create the backup and write the sql file as it does when i send the same command locally.
Any idea how to solve this ? Thanks for your help.
Bernard
Asked by Bernard Grosperrin
(11 rep)
Jul 12, 2024, 08:50 PM
Last activity: Jul 13, 2024, 01:50 PM
Last activity: Jul 13, 2024, 01:50 PM