Skip to main content

Hooks

Hook scripts are Python files referenced from the config. Feature example: examples/features/hooks/.

hooks:
before_run: hooks/before_run.py
before_request: hooks/before_request.py
after_response: hooks/after_response.py
after_page: hooks/after_page.py
after_run: hooks/after_run.py
HookWhen it runs
before_runOnce before the backup starts
before_requestBefore each HTTP request
after_responseAfter each HTTP response
after_pageAfter a page of records is stored
after_runOnce after the backup finishes

Custom extraction scripts

Some HTML / non-JSON APIs need Python to parse the body (examples/sozd/):

code:
postfetch: scripts/pagetodata.py
follow: scripts/listtodata.py