Created
November 12, 2020 02:49
-
-
Save dmc5179/049c7c71c82041216459ae3a369cba0c to your computer and use it in GitHub Desktop.
Clair export import
This file contains hidden or 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
#!/bin/bash -x | |
QUAY_NAMESPACE='quay-enterprise' | |
CLAIR_POSTGRES_POD=$(oc get -n ${QUAY_NAMESPACE} pods | grep clair-postgres | awk -F\ '{print $1}') | |
echo "POD: ${CLAIR_POSTGRES_POD}" | |
oc rsh -n ${QUAY_NAMESPACE} ${CLAIR_POSTGRES_POD} /bin/sh -c "pg_dump -U postgres -a -t feature -t keyvalue -t namespace -t schema_migrations -t vulnerability -t vulnerability_fixedin_feature clair" > clair_vulnerability.sql | |
oc rsh -n ${QUAY_NAMESPACE} ${CLAIR_POSTGRES_POD} /bin/sh -c "pg_dump -U postgres -c -s clair" > clair_clear.sql | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment