Skip to content

archellir/base_infrastructure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

base_infrastructure

Infrastructure for base server

For postgreSQL multiple databases scripts:

chmod +x scripts/create-multiple-postgresql-databases.sh

For pgAdmin:

sudo chown -R 5050:5050 <host_directory>

Database backup & restore:

Backup:

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

Restore:

cat <dump_name>.sql | docker exec -i <postgres-container-id> psql -U <user>

Example of connection:

# host = container_name
postgres://username:password@container_name:port/db_name