... | ... | @@ -2,7 +2,7 @@ This page will tell you the short and to the point stuff you need to know about |
|
|
|
|
|
- [1. Install on Ubuntu 20.\*](#1-install-on-ubuntu-20)
|
|
|
- [2. Passwords](#2-passwords)
|
|
|
- [3. Connect to DB](#3-connect-to-db)
|
|
|
- [3. Interact with DB](#3-interact-with-db)
|
|
|
- [4. Backup restore](#4-backup-restore)
|
|
|
- [4.1. Daily backup](#41-daily-backup)
|
|
|
- [4.2. Restore](#42-restore)
|
... | ... | @@ -28,7 +28,7 @@ There are many ways to use a password. For using DB commands from the command li |
|
|
docker exec -t wyatt_local_db bash -c 'echo "localhost:5432:wyatt:wyatt:somepasswd" > ~/.pgpass && chmod 0600 ~/.pgpass'
|
|
|
```
|
|
|
|
|
|
# 3. Connect to DB
|
|
|
# 3. Interact with DB
|
|
|
|
|
|
most often we do that from inside the container
|
|
|
|
... | ... | @@ -39,6 +39,7 @@ psql -U wyatt # to open psql as user wyatt to interact with the DB (the interact |
|
|
\l # lists all DB's
|
|
|
\c <name of DB> # connects to DB
|
|
|
\d # describes all in that DB
|
|
|
\dn # describes all schemas in that DB
|
|
|
select * from sys_user; # executes that select query (or whatever query you like)
|
|
|
\q # to quit
|
|
|
```
|
... | ... | |