1

Newbie to postgresql, I come from an Windows background with Backup Exec and Veritas GUI driven applications, I also have a Centos bacula background.

If this is in the wrong forum, please move.

I have a Windows Server with a postgreSQL database and looking into how to back it up and restore it with Windows command line or pgAdmin III.

I have used the pg_dump dbname > output file, and restore with psql dbname < infile. I have seen the post with pg_dump does not include tablespaces, groups or users and pg_dump only dumps one of my databases in a cluster / instance.

I also use the pgAdmin III backup and restore

My questions are:

With the pg_dump are there better commands switches to backup individual databases or the whole sql file / all databases?

Can you schedule the pgAdmin III for nightly backups?

Thanks

TK

2
  • For sql backup Iam not an expert, but usually you have a export/commit to do, so it truncate the transaction log and it make a file recoverable. Over that I usually do another kind of backup, wbadmin or the one you need Commented Oct 28, 2016 at 0:34
  • So if I have 3 databases in PostgreSQL a .bat file would be: net stop postgresql-9.4 pg_dump dbname > outputfile net start postgresql-9.4 Commented Oct 28, 2016 at 0:36

1 Answer 1

0

If you are looking for a way to backup PostgreSQL databases automatically according to the schedule then you can try PostgreSQL-Backup https://postgresql-backup.com it performs backups via pg_dump tool. Such backups can be easily restored via command prompt:

  1. Go to Postgres bin folder. For example: cd "C:\ProgramFiles\PostgreSQL\9.5\bin"

  2. Enter the command to restore your database. For example: psql.exe -U -d -f

  3. Type password for your postgres user

  4. Check the restore process

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.