Last active
December 14, 2015 02:28
-
-
Save lmacken/5013514 to your computer and use it in GitHub Desktop.
bzgrep apache logs for stuff and xz compress them over ssh to another box
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bzgrep 'stuff' /var/log/hosts/app0[1-8]*/*/*/*/http/access_log.bz2 \ | |
| cut -d':' -f2- \ | |
| xz --compress --stdout -3 \ | |
| ssh -c blowfish another_box \ | |
"cat - > ~/log.xz" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment