Skip to content

Instantly share code, notes, and snippets.

View diguinhorocks's full-sized avatar
🤘

Rodrigo Santiago Motta diguinhorocks

🤘
  • Itararé - São Paulo
View GitHub Profile
Backup:
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
Restore:
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres
@diguinhorocks
diguinhorocks / docker_permission_repair.sh
Created May 3, 2021 18:28
Fix Docker service permission on sock file (Ubuntu 18.04)
sudo setfacl --modify user:(your user here):rw /var/run/docker.sock