i have shell script running cron job, creates database dump backup purposes. when tried doing same in jenkins execute shell, following line seems giving errors:
mysqldump -p thepassword -u theussr --all-databases > databases.sql
what happens following error gets databases.sql file:
usage: mysqldump [options] database [tables] or mysqldump [options] --databases [options] db1 [db2 db3...] or mysqldump [options] --all-databases [options] more options, use mysqldump --help
i confused going wrong here. tried "-r databases.sql" , file comes out empty error being printed in console.
i appreciate if help.
thanks
for me, works in jenkins:
mysqldump -hxx.xx.xx.xx -pmy_pwd -umy_user db_name > ${filename}
i generating file name time stamp, like: filename=$(date +'%y%d%m-%h_%m').sql
Comments
Post a Comment