If you have to do this regularly (e.g. on a daily basis, as the backups are being created) I suggest to build the filename you expect to find and look for it on the local server. For example, if you want to upload the last created backup one day before the current day you can easily do
Code:
filename=daily-backup-$(date -d yesterday +%Y_%m_%d).zip
In this way you can take more control on the situation, do some checks and take appropriate actions if something is not as you expected, e.g.
- retrieve the backup of the previous day if the last one has not been crated, yet
- do e-mail notification about something going wrong
and so on...