I have the following script and it does everything EXCEPT the actual FTP transfer. I get advised that "/home/<account>/backup/backup_ftp.sh: line 30: ftp: command not found". I have highlighted row 30.
Any help would be appreciated.
Any help would be appreciated.
Code:
#!/bin/sh # Create the names for our sql file and compressed backup files. fileSQL="xxxx_db_backup.`date +%w`.sql" fileSQLZIP="xxxx_db_backup.`date +%w`.tgz" fileHomeZip="xxxx_home.`date +%w`.tgz" # Database Details userDB="yyyy_rrrr" passDB="xxxxxxxx" nameDB="yyyy_rrrr" # Home Directory Files tar cfz $fileHomeZip /home/<account>/public_html/ # Create the Dump/Copy of the database /usr/bin/mysqldump -u $userDB -p$passDB -c --add-drop-table $nameDB > /home/<account>/$fileSQL # Compress the sql File Ready for FTP tar cfz $fileSQLZIP /home/<account>/$fileSQL # FTP the file to another host location HOST='xxx.xxx.xxx.xxx' USER='<user>' PASSWD='<pass>' [B][COLOR="#B22222"][SIZE=3]ftp -n $HOST <<EOT[/SIZE][/COLOR][/B] USER $USER $PASSWD put $fileSQLZIP put $fileHomeZip quit EOT # Delete the Database Copy from the the Account cd /home/<account>/ #rm $fileSQL #rm $fileSQLZIP #rm $fileHomeZip
Comment