Skip to content

harsh3dev/codeBox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backup Command:

Run the following command to create a backup of the database from the running PostgreSQL container:

docker exec -t <container_name> pg_dump -U <db_user> <db_name> > backup.sql
  • Replace <container_name> with the name of PostgreSQL container (check using docker ps).
  • Replace <db_user> and <db_name> with the database username and database name.
  • The backup file will be saved as backup.sql in current directory.

Restore Command:

If needed, restore the database using:

cat backup.sql | docker exec -i <container_name> psql -U <db_user> -d <db_name>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors