Trying to do a backup of redash db but do not have password


#1

I am trying to perform this command but needs a password. This is running on aws instance and I putty to this server using a key.

sudo -u redash pg_dump redash | gzip > /tmp/SHED_redash_backup.gz
[sudo] password for postgres:
Sorry, try again.

Please help. Thanks


#2

Is it possible you’re running this command as the postgres user? Because otherwise I’m not sure why would it ask for its password.


#3

Strange but the command works now after doing a sudo su first. Must have been user error. Thanks!.