Hie all I am trying to backup of my application directory, database backup and then sending it to my ftp server at hetzner by using the following script and i get few errors
my server details: ubuntu12-04 (in hetzner) database: postgresql8.4 my ftp server: hetzner Trying to take backup at ubuntu12.04 server and copying in ftp my server
site=ftp://u***.your-backup.de username=u*** passwd=******************* backupdir=/opt/openbravo-erp filenameob="openbravo-erp.tar.gz" echo "Creating a ob backup file $filenameob of $backupdir." # Make a tar gzipped backup file tar -cvzf /home/hetznerftp/"$filenameob" "$backupdir" echo "creating a db backup file $filenamedb of ob database." export PGPASSWORD="*my db password*" backup_dir="/home/manideep/hetzner/" #String to append to the name of the backup files pg_dump -h localhost -U tad openbravo -Fc $i > $backup_dir$i\rajedb.backup #login into ftp server ftp -in <<EOF open $ftp_site user $username $passwd bin put /home/manideep/hetzner$filenameob put /home/manideep/hetznerftp/pgdump.backup close bye
When i try executing that script through command
i get following error
Creating a backup file openbravo-erp.tar.gz of /opt/openbravo-erp. creating a db backup file of ob database. ./hetznerbkup.sh: line 28: warning: here-document at line 21 delimited by end-of-file (wanted `EOF') (to) usage: open host-name [port] Not connected. Not connected. Not connected. Not connected.
How do i send those files through script?
and Will this replace the existing files while i use command
if not how do i do it? thankyou