Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 392 Bytes

README.md

File metadata and controls

19 lines (14 loc) · 392 Bytes

DOCKER

PostgreSQL DB container dump

Backup your databases

docker exec -t YOUR_DB_CONTAINER_NAME pg_dumpall -c -U postgres > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql

Restore your databases

cat YOUR_DUMP.sql | docker exec -i YOUR_DB_CONTAINER_NAME psql -U postgres

Quick clear all docker logs

truncate -s 0 /var/lib/docker/containers/*/*-json.log