473,385 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

What is a good approach to PostgreSQL database backups?

scubak1w1
Hello,

What is a good approach to PostgreSQL backups? (yep, a newbie)

(The server crashed and IT was not able to bring it back from the Acronis images - so rebuilding from scratch - ugh! - want to have a secondary system, that lesson is learnt!)

Ideally, having the compressed backup that pgAdmin is able to do run on some sort of Task Scheduler would be ideal... but seemingly no functionality for this...

So presumably write a DOS (sic) script to do a pg_dump once a week for every database and a pg_dumpall for the whole cluster (so I get the groups, roles, etc) say every month?? (to a separate network location)

Is there a 'lessons learned' style documentation online that I can ingest?

I was reading about Slony - but for the size of the database cluster (at least presently) it seems overkill? Or should I look at that?

Thanks in advance for any pointers, documentation links, etc...

Cheers:
GREG...
Nov 17 '09 #1

✓ answered by scottiebo

@scubak1w1
There actually is. If you look at the backup window in pg_admin, you'll see that it's running a command called pg_dump.exe. Take the whole command line that is running and you can have task scheduler run that for you automatically.


So presumably write a DOS (sic) script to do a pg_dump once a week for every database and a pg_dumpall for the whole cluster (so I get the groups, roles, etc) say every month?? (to a separate network location)
You can just do a pg_dumpall -g to get only the users / groups / tablespaces, you don't need to actually dump EVERYTHING out.


Is there a 'lessons learned' style documentation online that I can ingest?

I was reading about Slony - but for the size of the database cluster (at least presently) it seems overkill? Or should I look at that?
slony probably is overkill, take a look at point in time recovery (PITR)

http://www.enterprisedb.com/docs/en/...archiving.html




--
Scott Mead
EnterpriseDB

2 3883
@scubak1w1
There actually is. If you look at the backup window in pg_admin, you'll see that it's running a command called pg_dump.exe. Take the whole command line that is running and you can have task scheduler run that for you automatically.


So presumably write a DOS (sic) script to do a pg_dump once a week for every database and a pg_dumpall for the whole cluster (so I get the groups, roles, etc) say every month?? (to a separate network location)
You can just do a pg_dumpall -g to get only the users / groups / tablespaces, you don't need to actually dump EVERYTHING out.


Is there a 'lessons learned' style documentation online that I can ingest?

I was reading about Slony - but for the size of the database cluster (at least presently) it seems overkill? Or should I look at that?
slony probably is overkill, take a look at point in time recovery (PITR)

http://www.enterprisedb.com/docs/en/...archiving.html




--
Scott Mead
EnterpriseDB
Nov 17 '09 #2
VERY much appreciated... (and sorry for posting a non-technical reply... :-) )
Nov 17 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: John Mosey | last post by:
A huge (and never used) database log was taking up about 4 GB of HD space. We want the data for historical capacity, however, don't care about the transactions log. After a bit of research I ran...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
12
by: Sander Smeenk | last post by:
Hi, After a very recent postgresql update, the postmaster failed to start because of this: | PANIC: The database cluster was initialized with LC_CTYPE | 'nl_NL@euro.UTF-8', which is...
20
by: My Internet | last post by:
Hello, I am in the process to define if our product can use PostgreSQL. Do you know what type of application use PostgreSQL, and also what is the size of the database for these projects? ...
3
by: Bob.Henkel | last post by:
I write this to tell you why we won't use postgresql even though we wish we could at a large company. Don't get me wrong I love postgresql in many ways and for many reasons , but fact is fact. If...
5
by: Larry Menard | last post by:
Folks, I'm trying to port a PostgreSQL application to DB2 LUW 8.2.2 (Win32, if you must know). I've searched the web and can't find any guide to migrating from PostgreSQL to DB2, even on the...
6
by: Mudcat | last post by:
Hi, I am trying to build a tool that analyzes stock data. Therefore I am going to download and store quite a vast amount of it. Just for a general number - assuming there are about 7000 listed...
5
by: Steve | last post by:
Hi; I thought I would rephrase a question I asked in another post to more quickly get to the heart of the matter. My apologies for anyone who is offended by what appears to be a repetition. ...
2
by: Alex | last post by:
Hi, Probably a simple question :-) I've got a few xml aware databases on a 9.1.2 db2 server running on RHEL 4. As db2 V9.5 doesn't run on RHEL 4 I've set up a new server running RHEL5.1 with...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.