Last active
March 17, 2024 08:53
-
-
Save SurendraTamang/dad352814412f2f169a865c10970efa6 to your computer and use it in GitHub Desktop.
Cheetsheet for PostGresql learning
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
# For Restoring the the backup in the given database | |
# While running on docker I first copied the local file to docker container and docker cp and did below | |
psql -U {db_user} -d database_name -f {db}.sql |
Changing the Password
ALTER USER your_user WITH PASSWORD 'new_password';
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sudo docker exec -e PGPASSWORD="" -t {docker_name} pg_dump -U postgres {db} > backuptody.sql