Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Basically a shell script one liner, but cut at the pipes for readability:

Code Block
languagebash
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