#!/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
date +"%d-%m-%Y"
"cannot remove '/var/local/databases-backups/ps-11-10-2017.zip'$'\r': No such file or directory"
/var/local/databases-backups/ps-11-10-2017.zip'$'\r'
нет, есть, надо полагать, такой: /var/local/databases-backups/ps-11-10-2017.zip
.