Cheat sheet for PostgreSQL CLI tool
sudo apt install postgresql postgresql-contribsudo -i -u postgrespsqlCREATE DATABASE your_databasesudo systemctl enable postgresql\password your_postgres_passwordpostgresql://postgres:your_postgres_password@your_server_ip:5432/your_database\l\c your_database\dt\d+ productspg_dump -U postgres -d your_database > backup.sql # Local
pg_dump --verbose --no-owner --no-acl "<connection_string>" -f output_file #Remote, koristiti verbose uvek!dropdb your_database
createdb your_database
psql -U postgres -d your_database < backup.sql # Local
psql --verbose "<connection_string>" -f input_file # RemoteRestore can be done with using following params to just load or append data without making changes to the schema
--data-only
--inserts\qsuexit