TAR folder and send it to FTP
Hi All,
I am trying to setup a script that will ZIP up a directory and send it to a FTP Server
i am using this to create a backup from my 1 working directory and back it up nightly
here is the script i am using
#!/bin/sh
USER="user1"
PASSWD="password1"
HOST="HostIP"
# tar -zcvf /user1/PBXBackups/Backup.tar.gz /usr/local/pbx
FILE="/var/www/PBXBackups"
cd /user1/PBXBackups
ftp -n $HOST <<!EOF!
user $USER $PASSWD
binary
prompt
mput Backup.tar.gz
quit
!EOF!
Is this looking good? any suggestions ?
|