Some basic stuff here..<br><br>Having trouble with a bash script to download a backup file from a remote server. Plan is to grab a backup file which is created each night and bring it down to another box. Grabs the file created yesterday by defining filename based on today's date minus one day.<br>
<br>Below is the base of the script and I a just getting error local: file does not exist. Not even attempted the log and email alert part yet what am I missing? Feel very silly :)<br><br>tia <br>W<br><br><br><script><br>
<i>**** Some bits removed here. password user host definitions. shebang line is in place thought :)<br><br>FILE=$(date +%Y%m%d --date='1 days ago')<br>REMOTEDIR=backups/<br><br>ftp -in <<**<br>open $HOST<br>
user $USER $PASSWD<br>lcd /home/webfund/backups<br>bin<br>mget $REMOTEDIR/$FILE*<br>bye<br>**<br>echo ftp script done</i><br></script><br>