We can use the below script for moving files (like export dumps/RMAN backups) to FTP server for safety purpose.
********************************************************************************************************************
cat /TESTDB/app/bkp_scripts/test_sunday_to_ftp.sh
. /home/oracle/test.env
USERNAME=”—-Enter your username here—-”
PASSWORD=”—-Enter your password here—-”
SERVER=”—-Enter your name of the FTP server here—-”
DATE=$(date +”%d_%m_%y_%h”)
ODAT=`date -d “28 days ago” +”%d_%m_%y_%h”`
FILE=Cloud_Test-$DATE.tar.bz2
export BACKUPDIR=/TESTDB/app/backup/test_dmp
cd $BACKUPDIR
pwd
login to remote server
ftp -in $SERVER <<END_OF_SESSION
user $USERNAME $PASSWORD
ascii
bin
mkdir Cloud_bkp_Test_$DATE
ls
cd Cloud_bkp_Test_$DATE
ls
mput $FILE
cd ..
mdelete Cloud_bkp_Test_$ODAT/*
rmdir Cloud_bkp_Test_$ODAT
quit
END_OF_SESSION
exit 0
********************************************************************************************************************