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
To backup: | |
docker exec -u <your_postgres_user> <postgres_container_name> pg_dump -Fc <database_name_here> > db.dump | |
To drop db (Don't do it on production, for test purpose only!!!): | |
docker exec -u <your_postgres_user> <postgres_container_name> psql -c 'DROP DATABASE <your_db_name>' | |
To restore: | |
docker exec -i -u <your_postgres_user> <postgres_container_name> pg_restore -C -d postgres < db.dump | |
working example for awx postgres database |
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
# list containers | |
docker ps | |
# logon to container | |
docker exec -it awx_task /bin/bash |
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
{ | |
"msg": { | |
"rpc_reply": { | |
"interface-information": [ | |
{ | |
"physical-interface": [ | |
{ | |
"active-alarms": [ | |
{ | |
"interface-alarms": [ |