Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8940911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:10:13+00:00 2026-06-15T11:10:13+00:00

I am working on backup/restore data from postgresql for what I use pg_dump.exe and

  • 0

I am working on backup/restore data from postgresql for what I use pg_dump.exe and pg_restore.exe.

In order to restore backup file I have to delete actual tables in database what can be “suicidal job” if something with dumped file isn’t OK.

I can check dumped file for integrity with (say) ‘7z t mydump.gz’ what I do like first test.

But I would like to know, because this archive is original PG archive did PostgreSQL contain any technique to check this ‘.gz’ archive which I can take before deleting actual tables?

And if do, how to do a proper check?

EDIT: This is my actual command for dumping:

“C:\Program Files (x86)\PostgreSQL\9.1\bin\pg_dump.exe” –host localhost –port 5432 –username “postgres” –no-password –verbose -F t –file “C:\Users\User 1\Desktop\mydatabase.gz” “mydatabase”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:10:14+00:00Added an answer on June 15, 2026 at 11:10 am

    You appear to be trying to verify the validity and correctness of a PostgreSQL dump you’ve just made.

    Your key misunderstanding is that you do not have to restore the dump into the same database you created it from. You can restore to another database on the same cluster, or for extra paranoia a database on another cluster (server). Verify that the dump restored without error and that the data is as you expect it to be.

    For extra paranoia, stop the PostgreSQL server and copy the files in the data directory. That way you have a file-level backup too. Note that file-level copies of PostgreSQL data directories can only be read by the same major (8.1/8.2/…) version of PostgreSQL built with the same option on the same platform – so, if the datadir is from 9.2.x on Windows x64, it can only be read by another Windows x64 host with 9.2.x installed.

    If you’re worried about your original database then you probably don’t have backups. This is a critical problem. You need to go and urgently read the documentation chapter on backup and restore and get a good automated backup scheme in place. Have a look at barman.

    Update after question edit:

    -F t is an odd choice; plain SQL dumps or -F c usually makes more sense.

    The file you’ve produced is not a .gz (gzip compressed) file, anyway, it’s a .tar archive, not compressed. It can be extracted into a directory full of SQL files.

    To test it, use pg_restore to restore it to a new empty database created with createdb or the CREATE DATABASE command.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on SQL Server 2005. I have took the backup and restore
I have a working Gitolite server right now and I backup every week. Now
I have installed PostgreSQL and it is working ok. However, when I went to
Working on a backup laptop that doesn't have JD decompiler installed. Went to the
I cannot seem to get the backup attribute parameter working from my code. No
I have done this one for backup my database its working fine .... private
I have .net app in which there is function for Database backup and restore.
I've been working on a CMS and wanted to add a backup/restore function. I
I'm working on a web interface for modifying Oracle database backup settings. One of
We are taking db backups programatically by using SqlServer.Management.Smo.Backup class. It is working perfectly.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.