I first tried using heroku addons:add pgbackups
but heroku docs say that it has been deprecated. The instead recommended using this command as specified here
PGPASSWORD=mypassword pg_dump -Fc --no-acl --no-owner -h localhost -U myuser mydb > mydb.dump
But this throws the following error-
'PGPASSWORD' is not recognized as an internal or external command,
operable program or batch file.
I have already existing data on my local database and want to transfer those data into the heroku database. Any way to make this work or is there some other way?