GithubHelp home page GithubHelp logo

pre / post backup hook about pg_back HOT 3 CLOSED

orgrim avatar orgrim commented on August 15, 2024
pre / post backup hook

from pg_back.

Comments (3)

orgrim avatar orgrim commented on August 15, 2024

Hello,

Sorry for the delay in my answer.

pre/post hook are interesting. For instance, pre hooks could make the code smaller by let us put the pausing of the replay on standby elsewhere.

As for post hook, I think they are interesting only if they are asynchronous. But this would be difficult to implement with bash.

Regards,

from pg_back.

jmrenouard avatar jmrenouard commented on August 15, 2024

Hi @pgstef

Nice idea.

How to handle good cases from bad ones ?
For example, how to know that we can copy file on a remote location or not ?

Do we always run pre-hook even after failure ?

Br,

from pg_back.

jmrenouard avatar jmrenouard commented on August 15, 2024

Hi @pgstef @orgrim

Pre backup script: (before starting pg_back himself)
Always executed
If return code is different from 0, pg_back fails and run directly Post backup script

Post backup script: (after pg_back execution)
Always executed
One parameter: global return code (pg_back + pre backup script if exists)
If return code is different from 0, pg_back fails also.

So, if a problem occurs, pre and post script will be executed in all situations.
post script will be a garbage collector of error in pre script in all situations.
If pre script, post script or core pg_back fails return code couldn't be 0(SUCCESS)

from pg_back.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.