I want to ftp some local files to remote server but I want to backup the remote files before ftp.
My Requirement in detail:
Login to ftp account,
create a temp directory,
mover all the *.zip files that are in ftp home directory to this temp directory,
then copy the local machine files to this remote home directory.
I read somewhere that we cannot move the contents in the remote directory to another remote directory so I created a local directory and got all the files from remote machine and did a mput to move all the files back to the new directory. Somehow the script is not executing any commands after the mget. Below is the script.
rm -rf bkp_remote_files
ftp -in << EOF >> $LOG