Thursday, July 25, 2019

Compress a file before scp from remote server to local


ssh user@host "tar -zcvf - -C /path/to/dir filename" | tar -zxvf -

Note: only use when it's much faster to transfer a compressed file to your machine than transferring the original one.

Credits:
https://superuser.com/a/1354868
https://stackoverflow.com/a/3035446/1032449

Collectd PostgreSQL Plugin

I couldn't find this link when searching with google https://www.collectd.org/documentation/manpages/collectd.conf.html#plugin-postgresql