Database Research & Development

  • Home
  • NoSQL
    • NoSQL
    • Cassandra
  • Databases
    • Database Theory
    • Database Designing
    • SQL Server Coding Standards
    • SQL Server
    • PostgreSQL
    • MySQL
    • Greenplum
    • Linux
  • Interviews
    • SQL Server Interviews
    • MySQL Interviews
    • SQL Puzzles
  • DBA Scripts
    • SQL Server DBA Scripts
    • PostgreSQL DBA Scripts
    • MySQL DBA Scripts
    • Greenplum DBA Scripts
  • Home
  • Blog Archives !
  • (: Laugh@dbrnd :)
  • Contact Me !
sqlserverinterviews
Home 2017 February PostgreSQL: How to take a backup of your Table?

PostgreSQL: How to take a backup of your Table?

This article is half-done without your Comment! *** Please share your thoughts via Comment ***

Recently, I shared an article about copy your full database from one server to another server.

PostgreSQL: Copy Database to another Server in Windows (pg_dump – backup & restore)

I found one question on PostgreSQL FB Group like “How to take a backup of a table in PostgreSQL.”

You can do this exercise using pg_dump utility and pgAdmin tool.

Using pgAdmin tool:
Right-click on a table and select backup option. In Dump Option window, you can find an option like backup Only schema, backup Only Data. Enter your file name path, select backup mode as plain text and take the backup of your table. You can restore this table in any database.

Using psql, pg_dump utility:

1
2
\9.5\bin>pg_dump -U User_name -d database_name -t public.my_table > f:\my_table.sql
Password:****

Feb 6, 2017Anvesh Patel
PostgreSQL: Script to search any Text from the Stored FunctionSQL Server: Enable CHECKSUM Page Verification to detect a prime spot of Data Corruption
Comments: 6
  1. Amala
    April 4, 2018 at 1:40 pm

    Hai,
    I am Amala. I am currently working in Odoo platform with backend postgresql. I have to export application data from odoo to csv format. It is possible. But i couldn’t export datas in image field to csv format. Is there any method to do it.

    • Anvesh Patel
      Anvesh Patel
      April 4, 2018 at 7:26 pm

      Not sure, need to check

  2. Praneet
    June 11, 2018 at 12:52 pm

    It’s working but how to restore a single table in PostgreSQL.

    • Anvesh Patel
      Anvesh Patel
      June 12, 2018 at 6:43 pm

      Try this,
      pg_restore –data-only –table=tablename

  3. Shashank
    March 24, 2020 at 8:48 am

    Hi Anvesh,

    I am Shashank R.
    I want to Load and Unload data in PostgreSQL. Please let me know how do I do that.

  4. Shiwanshu
    March 26, 2020 at 9:31 am

    I want to get the back up of specific tables of the dockerized Postgres sql db without id..?

Anvesh Patel
Anvesh Patel

Database Engineer

February 6, 2017 PostgreSQLAnvesh Patel, database, database research and development, dbrnd, pg_dump, pgAdmin, plpgsql, Postgres Query, postgresql, PostgreSQL Administrator, PostgreSQL Error, PostgreSQL Monitoring, PostgreSQL Performance Tuning, PostgreSQL Programming, PostgreSQL Tips and Tricks, table backup
About Me!

I'm Anvesh Patel, a Database Engineer certified by Oracle and IBM. I'm working as a Database Architect, Database Optimizer, Database Administrator, Database Developer. Providing the best articles and solutions for different problems in the best manner through my blogs is my passion. I have more than six years of experience with various RDBMS products like MSSQL Server, PostgreSQL, MySQL, Greenplum and currently learning and doing research on BIGData and NoSQL technology. -- Hyderabad, India.

About DBRND !

dbrnd

This is a personal blog (www.dbrnd.com).

Any views or opinions represented in this blog are personal and belong solely to the blog owner and do not represent those of people, institutions or organizations that the owner may or may not be associated with in professional or personal capacity, unless explicitly stated.

Feel free to challenge me, disagree with me, or tell me I’m completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or anonymous comments) - so keep it polite.

The content of this website is protected by copyright. No portion of this website may be copied or replicated in any form without the written consent of the website owner.

Recent Comments !
  • Anvesh Patel { Sure will do... } – May 27, 12:43 PM
  • Anvesh Patel { Great... } – May 27, 12:41 PM
  • Anvesh Patel { Great... } – May 27, 12:39 PM
  • Anvesh Patel { Great... } – May 27, 12:36 PM
  • Anvesh Patel { Great... } – May 27, 12:28 PM
  • Anvesh Patel { Great... } – May 27, 12:27 PM
  • Anvesh Patel { Great... } – May 27, 12:16 PM
  • Older »
Follow Me !
  • facebook
  • linkedin
  • twitter
  • youtube
  • google
  • flickr
© 2015 – 2019 All rights reserved. Database Research & Development (dbrnd.com)
Posting....