pgdump to local machine

Larry Lüer 1 Reputation point

I have canceled my azure subscription and have 90 days to secure my data. I want to do a pgdump from my postges db to my local hard disk. I have found this post:

which seems utterly complex. Is there not a simpler solution? If not, why not?
Thanks, Larry

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. Anurag Sharma 17,566 Reputation points

    Hi anonymous userLer-8938, welcome to Microsoft Q&A forum.

    The link that you have provided corresponds to Azure SQL Database, but I think what you are looking for is Azure Database for PostgreSQL as per your query. You can use the below article to create a dump file on your local system by connecting to Azure Postgres.

    Migrate your PostgreSQL database by using dump and restore

    I also tried using the below command and was able to create dump of database:

    pg_dump -Fc -v --host=<yourpostgresserver> --username=username@xxxxxx --dbname=<yourdatabasename> -f backup.dump  

    I am assuming you already have PostgreSQL installed on system.

    You also need to add a firewall to connection security from the machine you are running this command from.

    Please let me know if this helps or you need more information.


    if answer helps, you can mark it 'Accept Answer'

    0 comments No comments