Answer the question
In order to leave comments, you need to log in
How to solve problem with deleting zip file via shell script?
There is a written script
#!/bin/bash
mysqldump -u USER -p"PASSWORD" ps > /var/local/databases-backups/ps-$(date +"%d-%m-%Y").sql
zip /var/local/databases-backups/ps-$(date +"%d-%m-%Y").zip /var/local/databases-backups/ps-$(date +"%d-%m-%Y").sql
rm /var/local/databases-backups/ps-$(date +"%d-%m-%Y").sql
#use aws (Amazon's tool) to sync your backups to Amazon S3
/usr/bin/aws s3 sync /var/local/databases-backups s3://apstay2017/Databases/ > /root/aws.log
rm /var/local/databases-backups/ps-$(date +"%d-%m-%Y").zip
Answer the question
In order to leave comments, you need to log in
First, here's the use in teams several times: a
bummer can occur.
Secondly, in the text of the error everything is written:
Such a file:
/var/local/databases-backups/ps-11-10-2017.zip'$'\r'
no, there is, presumably, such: /var/local/databases-backups/ps-11-10-2017.zip
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question