> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polystack.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Schedule Backup Jobs

> Create and manage recurring backup jobs for daily incremental and weekly full backups with retention windows using Ironcore Backup Solution.

## Overview

A **backup job** runs the same backup automatically on a schedule. Define which
workloads to back up, when to run, and how long to keep each generation. The
standard pattern for production workloads is **daily incremental + weekly full**
with the daily run feeding the weekly chain.

This page covers creating a job, the retention window syntax, and tuning the
schedule for compliance windows.

<Note>
  **Prerequisites**

  * An active Polystack account with project membership
  * A datastore your project can write to
  * Workloads identified for protection
</Note>

***

## Recommended Retention Pattern

The pattern below satisfies the standard compliance retention model: 7 days of
daily incrementals on the Primary DC, 3 weeks of weekly fulls on the Primary
DC, and 52 weeks of weekly archival fulls on the Backup site.

<CardGroup cols={3}>
  <Card title="Daily Incremental" icon="copy" color="#bf9667">
    Schedule: 02:00 daily — Retention: `keep-daily=7` — Target: Primary DC
    datastore. Only changed blocks are uploaded; runs complete in minutes for
    most workloads.
  </Card>

  <Card title="Weekly Full" icon="calendar-days" color="#bf9667">
    Schedule: Sunday 03:00 — Retention: `keep-weekly=3` — Target: Primary DC
    datastore. Forms the base of the next incremental chain.
  </Card>

  <Card title="Weekly Archival" icon="archive" color="#bf9667">
    Schedule: Sunday 04:30 — Retention: `keep-weekly=52` — Target: Backup site
    datastore. Replicated from Primary DC by a sync job (administrator).
  </Card>
</CardGroup>

***

## Create a Daily Incremental Job

<Tabs>
  <Tab title="Dashboard" icon="gauge">
    <Steps titleSize="h3">
      <Step title="Open Jobs" icon="external-link">
        Navigate to **Backup Solution** > **Jobs**.
      </Step>

      <Step title="Click Create" icon="plus">
        Click **Create Backup Job**.
      </Step>

      <Step title="Name the job" icon="tag">
        Enter a descriptive **Name**, for example `daily-prod-incr`.
      </Step>

      <Step title="Select sources" icon="server">
        Add the workloads to back up. Use the **Include** and **Exclude** filters
        to scope by name, tag, or project.
      </Step>

      <Step title="Choose datastore and namespace" icon="database">
        Select the target datastore and, optionally, a namespace.
      </Step>

      <Step title="Set the schedule" icon="calendar">
        Set **Schedule** to `02:00`. The schedule field accepts systemd-style
        expressions — see the syntax table below.
      </Step>

      <Step title="Configure retention" icon="trash-2">
        Open the **Retention** section and set `keep-daily=7`. The Prune Simulator
        preview shows which generations the job would keep.
      </Step>

      <Step title="Enable notifications" icon="bell">
        Add the project notification group. The job sends success and failure
        alerts to the configured recipients.
      </Step>

      <Step title="Save" icon="check">
        Click **Save**.

        <Check>The job appears in the Jobs list. Next run time is shown in the schedule column.</Check>
      </Step>
    </Steps>
  </Tab>

  <Tab title="CLI" icon="terminal">
    ```bash title="Create a daily incremental backup job" theme={null}
    ironcore-backup job create \
      --name daily-prod-incr \
      --schedule "02:00" \
      --type vm \
      --source-id 12345,12346,12347 \
      --repository ibs-primary \
      --namespace production \
      --retention keep-daily=7 \
      --notification-mode always
    ```

    <Check>The job is listed under `ironcore-backup job list` and will run at the next scheduled time.</Check>
  </Tab>
</Tabs>

***

## Create a Weekly Full Job

<Tabs>
  <Tab title="Dashboard" icon="gauge">
    Use the same flow as the daily job, with these differences:

    | Field     | Value              |
    | --------- | ------------------ |
    | Name      | `weekly-prod-full` |
    | Schedule  | `Sun 03:00`        |
    | Mode      | **Full**           |
    | Retention | `keep-weekly=3`    |
  </Tab>

  <Tab title="CLI" icon="terminal">
    ```bash title="Create a weekly full backup job" theme={null}
    ironcore-backup job create \
      --name weekly-prod-full \
      --schedule "Sun 03:00" \
      --type vm \
      --source-id 12345,12346,12347 \
      --repository ibs-primary \
      --namespace production \
      --mode full \
      --retention keep-weekly=3 \
      --notification-mode always
    ```
  </Tab>
</Tabs>

***

## Schedule Syntax

Schedules use a calendar event syntax similar to systemd OnCalendar.

| Expression       | Meaning                               |
| ---------------- | ------------------------------------- |
| `02:00`          | Every day at 02:00                    |
| `*-*-* 02:00`    | Every day at 02:00 (explicit form)    |
| `Mon..Fri 18:00` | Every weekday at 18:00                |
| `Sun 03:00`      | Every Sunday at 03:00                 |
| `*-*-01 03:00`   | The first day of every month at 03:00 |
| `hourly`         | Every hour, top of the hour           |
| `daily`          | Every day at midnight                 |
| `weekly`         | Every Monday at midnight              |

<Tip>
  Stagger schedules so that high-IO jobs do not collide. For example, daily
  incrementals at 02:00, weekly fulls at 03:00, archival sync at 04:30,
  verification at 05:00.
</Tip>

***

## Retention Windows

| Window           | Behaviour                                                   |
| ---------------- | ----------------------------------------------------------- |
| `keep-last=N`    | Keep the N most recent snapshots regardless of age          |
| `keep-hourly=N`  | Keep the most recent snapshot for each of the last N hours  |
| `keep-daily=N`   | Keep the most recent snapshot for each of the last N days   |
| `keep-weekly=N`  | Keep the most recent snapshot for each of the last N weeks  |
| `keep-monthly=N` | Keep the most recent snapshot for each of the last N months |
| `keep-yearly=N`  | Keep the most recent snapshot for each of the last N years  |

Multiple windows can combine. For example, `keep-daily=7, keep-weekly=4,
keep-monthly=12` retains the last 7 days, plus one snapshot per week for 4 weeks,
plus one snapshot per month for 12 months — using the same underlying chunks
through deduplication.

<Warning>
  Removing a retention window does not delete historical snapshots immediately —
  pruning happens during the next prune pass. Run the **Prune Simulator** before
  changing windows to preview the impact.
</Warning>

***

## Trigger a Job Manually

<Tabs>
  <Tab title="Dashboard" icon="gauge">
    From **Jobs**, select the job and click **Run Now**. The schedule resumes
    afterward — the manual run does not skip the next scheduled run.
  </Tab>

  <Tab title="CLI" icon="terminal">
    ```bash theme={null}
    ironcore-backup job run --name daily-prod-incr
    ```
  </Tab>
</Tabs>

***

## Job Notifications

Configure notification mode to control alerting volume:

| Mode     | Sends notification when         |
| -------- | ------------------------------- |
| `always` | Every run (success and failure) |
| `errors` | Only when the run fails         |
| `never`  | No notifications                |

Project administrators can attach a notification group to each job. Notification
groups dispatch to email, webhooks, or external metric servers — see
[Notifications](/services/ironcore-backup/admin-guide/notifications).

***

## Job Lifecycle

```mermaid theme={null}
stateDiagram-v2
    [*] --> Scheduled
    Scheduled --> Running: Schedule trigger
    Running --> Completed: Backup succeeds
    Running --> Failed: Backup errors
    Completed --> Scheduled: Wait for next run
    Failed --> Scheduled: Notification sent
    Scheduled --> Disabled: Operator pause
    Disabled --> Scheduled: Operator resume
```

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Monitoring Jobs" icon="activity" href="/services/ironcore-backup/user-guide/monitoring-jobs" color="#bf9667">
    Track active and historical job runs
  </Card>

  <Card title="Restore Options" icon="rotate-ccw" href="/services/ironcore-backup/user-guide/restore-options" color="#bf9667">
    Restore from any backup created by the job
  </Card>

  <Card title="Retention Policies" icon="calendar-days" href="/services/ironcore-backup/admin-guide/retention-policies" color="#bf9667">
    Administrator view of retention and pruning behaviour
  </Card>

  <Card title="Replication and Sync" icon="arrow-left-right" href="/services/ironcore-backup/admin-guide/replication-sync" color="#bf9667">
    How weekly backups reach the Backup site
  </Card>
</CardGroup>
