I am on Ubuntu 18.04 and I am using Postgresql database. I ran the command
pg_dump dbname > db.bak
but when I do this, it outputs nothing. I tried to supply a path to the backup and the file does not show up.
My exact commands ran are:
sudo -i -u postgres
psql
pg_dump dbname > db.bak
pg_dump dbname > /db.bak
\! pwdto see what the current directory is.