# Trigger Script on LINSTOR Backup Shipping Schedule (Pre/Post Hook Support?)

**URL:** <https://forums.linbit.com/t/trigger-script-on-linstor-backup-shipping-schedule-pre-post-hook-support/872>\
**Category:** LINSTOR\
**Tags:** linstor\
**Created:** [June 22, 2025, 5:45am UTC](https://forums.linbit.com/t/trigger-script-on-linstor-backup-shipping-schedule-pre-post-hook-support/872 "2025-06-22T05:45:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kishorekumar](https://avatars.discourse-cdn.com/v4/letter/k/2bfe46/32.png) [@kishorekumar](https://forums.linbit.com/u/kishorekumar)\
**Post date:** [June 22, 2025, 5:45am UTC](https://forums.linbit.com/t/trigger-script-on-linstor-backup-shipping-schedule-pre-post-hook-support/872/1 "2025-06-22T05:45:49Z")

</div>

* * *

**Title: Trigger Script on LINSTOR Backup Shipping Schedule (Pre/Post Hook Support?)**

Hi all,

I’m using LINSTOR’s **snapshot shipping schedule** feature, and I have a question regarding scripting hooks.

As per the documentation [here](https://linbit.com/drbd-user-guide/linstor-guide-1_0-en/#s-linstor-creating-backup-shipping-schedule), you can create a backup shipping schedule using a command like:

```auto
# linstor schedule create \
  --incremental-cron '* * * * *' \ # (1) Incremental backup cron
  --keep-local 5 \ # (2) Retain 5 local backups
  --keep-remote 4 \ # (3) Retain 4 remote backups
  --on-failure RETRY \ # (4) Retry policy
  --max-retries 10 \ # (5) Max retry attempts
  <schedule_name> \ # (6) Schedule name
  '* * * * *' # (7) Full backup cron schedule

```

followed by

```auto
# linstor backup schedule enable \
  [--node source_node] \ (1)
  [--rg resource_group_name | --rd resource_definition_name] \ (2)
  remote_name \ (3)
  schedule_name (4)

```

I would like to **trigger a script** at two specific points:

1. **Before the shipping starts** – to notify the user that replication is about to begin.
2. **After the shipping completes** – to confirm replication has finished (success or failure).

**Is there a built-in way to have the shipping schedule call a custom script before and/or after the operation runs?**  
Or alternatively, is there a hook/event I can attach to, or a log monitor workaround that is commonly used for this?

Appreciate any insights or examples from those who have implemented something similar.

Thanks!

---

<div class="post-metadata">

**Author:** ![kishorekumar](https://avatars.discourse-cdn.com/v4/letter/k/2bfe46/32.png) [@kishorekumar](https://forums.linbit.com/u/kishorekumar)\
**Post date:** [June 22, 2025, 5:51am UTC](https://forums.linbit.com/t/trigger-script-on-linstor-backup-shipping-schedule-pre-post-hook-support/872/2 "2025-06-22T05:51:01Z")

</div>

One option is to disable the linstor schedule and go custom cron.
