I have a script on my local machine which helps me to connect to my ec2. But, it does not runs the script file specified.
awsconnect.sh:
ssh -i ".pemfile" ubuntu@"ec2-instance"
./data.sh
data.sh
is my file on the aws-ec2.
data.sh:
mkdir -p dumps/$(date +"%Y%m%d");
mysqldump -h localhost -port=3306 -u root -proot abc | gzip > dumps/$(date +"%Y%m%d")/abc.sql.gz;
logout
My data.sh
file is running fine if i run it from aws-ec2 command line.
But, it is not running from my script file.
What is the problem?