postgresql

su - postgres
vacuumdb --all --full -v
su - postgres
psql template1
\l
\du
SELECT rolname FROM pg_roles;
 
CREATE USER USER WITH PASSWORD 'mypass';
GRANT ALL PRIVILEGES ON DATABASE template1 TO USER;
 
SELECT rolname FROM pg_roles;
GRANT postgres TO joe;
# list tables
sudo -u postgres psql -p 5430 -l
 
# dump table
sudo -u postgres pg_dump -p 5430 -c jiradb | xz > jiradb.sql.xz
 
sudo -u postgres psql -p 5430 -c 'drop database jiradb'