>>>>> On Wed, 25 Jan 2012 09:34:10 -0800, Steven Schlansker said:
>
> Hi all,
>
> I'm trying to set up a Bacula job to run a hot backup of a PostgreSQL
> installation.
>
> The fundamentals of how it would work are covered in the manual, but I will
> summarize here for the list.
> http://www.postgresql.org/docs/devel/static/continuous-archiving.html
>
> Normally if you just take a filesystem backup of the Postgres data files, you
> will end up with completely
> inconsistent data. But if you turn on WAL archiving and keep the WAL files
> with the backup, the database
> then can recover all the potentially corrupt segments by replaying these
> archived WAL files.
>
> The only catch is that you need all the WAL files archived at least until the
> backup of the main data files finishes.
>
> All this means that if only I could guarantee that the WAL files are backed
> up after the data files, I could have complete
> hot backups of my Postgres install with only a short pre/post hook.
>
>
> Looking through the documentation, there's no obvious way to guarantee order
> or backups within a FileSet. Is there some particular
> order that Bacula uses that I can rely on portably? (I assume not, but would
> love if there is) If not, would it be hard to add an
> option that say ensures that backups recurse in e.g. alphabetical order?
>
> I know I could set up two FileSets and two Jobs, but that is both more
> complex and makes doing differential / incremental backups and restores much
> more complicated. I'd prefer to have a single job that does it all.
The problem is larger than just guaranteeing the order -- you also have to
generate the list of WAL files after the main data files have been archived.
You could make a fileset with two Include sections, one which starts at / but
excludes the WAL files (with the Exclude = yes option) and other that includes
only the WAL files. The main data files would be archived by the first
Include section.
__Martin
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|