On Sat, Nov 29, 2008 at 3:23 PM, Andrus <kobruleht2@xxxxxx> wrote: > Uwe, > > thank you very much. I created script and ran it from command line: > > #!/bin/sh > PGUSER=postgres > PGPASSWORD=password > export PGUSER PGPASSWORD > backupdir=/root/my-backups > backupdate=$(date +%u) > backupfile=${backupdir}/mybackup${backupdate}.backup > pg_dump -Fc -b -Z6 mydb >${backupfile} > /usr/bin/ftp -inp <<EOF > debug 10 > hash off > tick on > open myftpsite.com > user myuser mypass > pwd > bin > verbose > remotestatus > lcd /root/my-backups > put "${backupfile}" > stat > bye > > PGUSER="" > PGPASSWORD="" > export PGUSER PGPASSWORD > > file /root/my-backups/mybackup6.backup is created: > > ls -l /root/my-backups/mybackup6.backup > -rw-r--r-- 1 root root 3155454 30. nov 00:06 > /root/my-backups/mybackup6.backup > > ftp upload failed: > > Output from script: Are you using ftp or lftp? lftp is much more scriptable / controllable than regular ftp. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general