💾 Archived View for elmau.net › notes › postgres.gmi captured on 2023-07-22 at 16:24:29. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-03-01)

🚧 View Differences

-=-=-=-=-=-=-

Postgres

sudo apt install postgresql
sudo vim /etc/postgresql/12/main/pg_hba.conf

    local       all     postgres            trust
    local       all     all                 scram-sha-256

sudo systemctl restart postgresql

psql -U postgres

    create role ROLE_NAME with login encrypted password 'CONTRASEÑA';

    create database NAME with owner ROLE_NAME;

pg_dump -U postgres -d DATA_BASE -Fc -f NAME.bk

pg_restore -U postgres -d DATA_BASE NAME.bk

Regresar el índice

Regresar el inicio