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

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -