I have a script running with cronjob, right now it's not working with cronjob.
If I run script manually via SSH, it requires a password and script working with password. How can I get past the password requirement and get it to work in cronjob?
This script is on server 1 and MYSQL on server 2, both are on the same local network and use UBUBTU.
backup.sh: ...
#!/bin/bash
PRIMARY=10.201.**.**
BACKUPDIR=/home/backuser/backups
FILENAME="daily-sql-$(date +%F-%H.%M).sql.xz"
ssh ${PRIMARY} "sudo mysqldump --single-transaction --quick --no-autocommit -uMysqluser -pMyslpass dbasese | xz" > $BACKUPDIR/$FILENAME
...