Bacula-users

Re: [Bacula-users] PostgreSQL - how to exclude bacula database?

2012-12-27 17:28:36
Subject: Re: [Bacula-users] PostgreSQL - how to exclude bacula database?
From: Dan Langille <dan AT langille DOT org>
To: Wolfgang Denk <wd AT denx DOT de>
Date: Thu, 27 Dec 2012 17:23:51 -0500
On Dec 27, 2012, at 4:21 PM, Wolfgang Denk wrote:

> Hi again,
> 
> here is another PostgreSQL related question:  when backing up the
> database server, I would like to exclude the bacula database (which
> gets backed up separately anyway).
> 
> With MySQL, I could do this easily with somthing like this:
> 
>    Options {
>      RegexFile = "^/var/lib/mysql/mysql-bin."  # exclude MySQL replication 
> logs and index
>      RegexFile = "^/var/lib/mysql/bacula/"     # exclude bacula DB itself - 
> backup separately
>      RegexFile = "^/var/lib/mysql/ib"
>      Exclude = yes
>    }
> 
> However, none of the PostgreSQL based examples I have seen so far
> contain similar (at least similar obvious) exclude rules. What am I
> missing here?

It depends on where your PostgreSQL database is.  On FreeBSD, which is my 
preferred
operating system for a server, this is /usr/local/pgsql

That is the usual location, but it may vary.

However, there may be things that you do want to back up.  Especially in 
/usr/local/pgsql/data:

at a minimum, I would backup:

pg_hba.conf
pg_ident.conf
postgresql.conf

But given you want regex, I'd go with:

pg_multixact    pg_subtrans     pg_twophase
pg_stat_tmp     pg_tblspc       pg_xlog
pg_clog   base  global  postmaster.log

This assumes you are dumping each database, including the globals database, to 
disk and backing that up.

-- 
Dan Langille - http://langille.org


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users