Skip to content

Instantly share code, notes, and snippets.

@hgmiguel
Last active July 13, 2017 14:18
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hgmiguel/aeae19bf5a36f76891257fbc216677bf to your computer and use it in GitHub Desktop.
Save hgmiguel/aeae19bf5a36f76891257fbc216677bf to your computer and use it in GitHub Desktop.
Download rds log file
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
@neilljordan
Copy link

Very handy, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment