linux - Upload a file into a ftp server using buffered output with Curl -
i want upload database backup file external ftp server using curl. use postgres , pg_dump streams content of file buffered output. tried
echo pg_dump dbname| gzip" | curl -d @- ftp://user:pass@host:/pg_dump/$(date +"%y%m%d%h%m")_dump.gz
but doesn't work. suggestion?
i tried
pg_dumpall | gzip | curl -t ftp://user:pass@host:/pg_dump/$(date +"%y%m%d%h%m")_dump.gz
and worked.
Comments
Post a Comment