tattle-made / DAU

MCA Tipline for Deepfakes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add the hash operator value to a PostgreSQL Database in the worker

aatmanvaidya opened this issue · comments

Command to access postgres using psql

psql -h postgres -p 5432 -U tattle -d postgres

take the backup of the data using pg_dump

RUN apt-get update && apt-get -y upgrade && \
    sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \
    wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
    apt-get update && apt-get install -y postgresql-client-16

Take the backup of the data

pg_dump -U tattle -h postgres -p 5432 postgres > data.sql

restore the data back up

psql -U tattle -h postgres -p 5432 -d postgres < data.sql

This is the format
username - host - port - dbname