Forums

pg_dump's Dump file not showing in home directory not even in its sub directories.

I am running this command

pg_dump --host=HOSTNAME --port=PORT --username=super --format=c --file=pgbackup`date +%F-%H%M`.dump mydb

but I am not getting any output file what so ever. Also I am not getting any error while running this command. Please help!

[edit by admin: formatting]

That's very strange. Sorry if this is a silly question, but are you replacing "HOSTNAME", "PORT" and "mydb" with the appropriate values?

Yes I am doing a those with correct values, but I want to confirm that I created my db with some capital and small(MyDataBase) letter but when I did \l it shows everything in small letter(mydatabse) so I am using the small one does it matter? Or I need to use the capital one

Does this help?

I don't want to drop my database

the main point is that you need to have quotes around the name if you use upper case db tables

I tried not working. :(

hi- I believe that we may have been corresponding over email. If so, make sure you are running this from a bash console, and not from a postgres console (that only lets you make postgres queries, not run backups and other commands)

Thanks for your support guys, I realized yesterday that i need to run commands from terminal. And when I did so Iwas able to restore and backup my database thanks.

Glad you were able to work it out :-) I guess the reason the original command wasn't printing anything was that Postgres was waiting for a semicolon to finish the line.