I tried to the following but failed... any suggestions?
I've put the script in an .sh file and placed it under directory - /var/sentora/cronbackup/dailybackup.script.sh
In crontab -e added the following:
But it's not working.... Any suggestions?
I've put the script in an .sh file and placed it under directory - /var/sentora/cronbackup/dailybackup.script.sh
Code:
#!/bin/sh
USERNAME="****"
PASSWORD="*****"
SERVER="ftp.****.com"
# local directory to pickup *.tar.gz file
FILE="/var/sentora/hostdata/"
# remote server directory to upload backup
BACKUPDIR="/oxenbackup"
# login to remote server
ftp -n -i $SERVER <<EOF
user $USERNAME $PASSWORD
cd $BACKUPDIR
mput $FILE/*.tar.gz
quit
EOF
#!/bin/sh
USERNAME="****"
PASSWORD="*****"
SERVER="ftp.****.com"
# local directory to pickup *.tar.gz file
FILE="/var/sentora/hostdata/"
# remote server directory to upload backup
BACKUPDIR="/oxenbackup"
# login to remote server
ftp -n -i $SERVER <<EOF
user $USERNAME $PASSWORD
cd $BACKUPDIR
mput $FILE/*.tar.gz
quit
EOF
In crontab -e added the following:
Code:
* * * * * /var/sentora/cronbackup/dailybackup.script.sh