...
Basically a shell script one liner, but cut at the pipes for readability:
Code Block | ||
---|---|---|
| ||
pg_dump -U username -h hostname -a --inserts --disable-dollar-quoting --quote-all-identifiers filesender | sed -r 's/^INSERT^(INSERT\ INTO\ \")(files|logs)(\"/INSERT INTOVALUES\ `)/\1`\2`\3/g' | grep --color=never "^INSERT INTO" | mysql -u username -h hostname -p filesender |