Last active
July 13, 2017 14:18
-
-
Save hgmiguel/aeae19bf5a36f76891257fbc216677bf to your computer and use it in GitHub Desktop.
Download rds log file
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
for i in `aws rds describe-db-log-files --db-instance-identifier ${INSTANCE} --output text | awk '{print $3}' | sed '$d' ` ; do | |
FILE=`basename ${i}` | |
if [ ! -e ${INSTANCE}/${FILE} ]; then | |
aws rds download-db-log-file-portion --db-instance-identifier ${INSTANCE} --log-file-name ${i} --output text > ${INSTANCE}/${FILE} | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very handy, thanks!