Star

Created With

linkHooks

If you want to perform some commands before and/or after a backup, you can use hooks.

They consist of a list of commands that will be executed in the same directory as the target from.

The following hooks groups are supported, none are required:

.autorestic.yml
1linklocations:

2link my-location:

3link from: /data

4link to: my-backend

5link hooks:

6link before:

7link - echo "One"

8link - echo "Two"

9link - echo "Three"

10link after:

11link - echo "Byte"

12link failure:

13link - echo "Something went wrong"

14link success:

15link - echo "Well done!"

linkFlowchart

  1. before hook
  2. Run backup
  3. after hook
    • success hook if no errors were found
    • failure hook if at least error was encountered

If the before hook encounters errors the backup and after hooks will be skipped and only the failed hooks will run.

HooksFlowchart

Home Quick Start Installation Configuration Upgrade

Locationschevron_right

Overview Hooks

Optionschevron_right

Cron Docker Volumes

Backendchevron_right
CLIchevron_right

Examples QA Community Contributors