# Scheduler & retention

#### Scheduler and retention settings control how often backups run and how long they are stored.

***

## Scheduler <a href="#scheduler" id="scheduler"></a>

The **scheduler** tool allows you to automate the execution of your backup plans. Instead of starting backups manually each time, you can define when and how often they should run.&#x20;

By configuring the backup plan schedule, you ensure that your data is regularly protected without requiring constant supervision. You can set the frequency, specific days, and hours for the plan to run, and also adjust it to your business hours or compliance requirements.

### <mark style="background-color:blue;">Schedule types</mark>

You can choose one of **four different schedule types**:

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FJFehZHEc39s7vEukp6wj%2Fimage.png?alt=media&#x26;token=bdc533e1-3215-4154-8287-35e45f67111f" alt=""><figcaption></figcaption></figure>

1. **Basic** — it allows you to perform a full backup once per month, and incremental backups on a daily basis.
2. **Custom** (**FIFO** — first in, first out) — lets you choose how often your copies should be created. If the custom type of schedule is chosen, you can perform two types of copies: full and incremental.
3. **Forever incremental** — this type of schedule starts with a single full backup, followed by incremental backups for all subsequent runs; you can set incremental copies to occur hourly, daily, weekly, or monthly.
4. **GFS** (grandfather—father—son) — it doesn't allow you to set how often copies are created (full copies once per month, differential copies once per week, and incremental copies every day), but it does let you include differential copies in the schedule.

### <mark style="background-color:blue;">Scheduling tips</mark>

* [x] For every type of schedule, you can specify the time when your backup tasks should start.
* [x] For **custom** and **forever incremental** backup schedules, you can specify the day of the month or week when the full backup should run, as well as the hour it should start.
* [x] In **Other settings**, you can define the time zone for your backup tasks. Learn more about time zones in [this article](https://helpcenter.xopero.com/xopero-one-en/management/time-zones).

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FYncCIYdMsjiUBsjJUQfq%2Fimage.png?alt=media&#x26;token=0dac91c0-e98b-42eb-8af2-855e6843029a" alt=""><figcaption></figcaption></figure>

* [x] You can set a **Schedule Window** in **Other settings** to define a time period during which the backup will not run (for example, during critical business hours).

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FM9yUcSNLyKiAleFh7dPx%2Fimage.png?alt=media&#x26;token=9aeb1ad3-4142-4149-bace-6685521a58bb" alt=""><figcaption></figcaption></figure>

***

## Retention <a href="#data_retention" id="data_retention"></a>

The **retention** tool allows you to define how long **Xopero ONE** will keep your backups in the selected storage. You can choose one of three rules to determine how long your data will be stored.

### <mark style="background-color:blue;">Configuration</mark>

To configure retention, click the **Edit** button in **Retention** section at the bottom of the **Add schedule** panel.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FJDLrNbagEeibKVL7pIOX%2Fimage.png?alt=media&#x26;token=58664751-046c-4c93-b925-3ffafd1f3ec5" alt=""><figcaption></figcaption></figure>

Select a rule from the drop-down list in the retention options to apply the chosen retention policy to your backup plan:

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FQQjFAy2EIGYmeiUCWcHp%2Fimage.png?alt=media&#x26;token=4568a98f-8307-4e32-9590-39fcba042d7d" alt=""><figcaption></figcaption></figure>

1. **By time** — choose different retention periods for each type of backup copy. You can set separate retention durations for full, differential (only for **GFS**), and incremental copies.

{% hint style="info" %}
For example, in **Basic** type of schedule, if you want to store your full backup for 1 month and incremental backups for 2 days, **Xopero ONE** <mark style="color:red;">**will not delete**</mark> the incremental backups after two days. To restore the complete backup chain, **Xopero ONE** requires **1 full backup and all associated incremental copies for the month** (29 or 30, depending on the number of days in a month and assuming daily backups).

All backup versions (full, incremental, differential) are stored according to the configured retention policy. In general, retention by time is the method recommended by **Xopero**.
{% endhint %}

2. **Keep infinitely** — your backup copies won't be removed; **Xopero ONE** will store them permanently.
3. **By number of copies** — <mark style="color:red;">**minimal**</mark> number of versions to store.

{% hint style="info" %}
Similar to the time-based retention scheme, if you want to store data by the number of copies, **Xopero ONE** <mark style="color:red;">**will not delete a backup version**</mark> if removing it would break the backup chain and make restoration impossible.
{% endhint %}

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FVXFzeOb8KGRjFFp8vuH4%2Fbackup%20chain%20kb.png?alt=media&#x26;token=1d463a47-71c2-4d98-a4b5-94ff73b6afcc" alt=""><figcaption><p><em><strong>Xopero ONE</strong> can remove entire chains, but <strong>it cannot break them</strong>.</em></p></figcaption></figure>

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FH9uzy4ax4U2MjtUq0U5h%2Fbackup%20chain%20deletion%20not%20OK.png?alt=media&#x26;token=12206009-29ba-4fa6-9a11-caf4e0614dc6" alt=""><figcaption><p><em>When selecting to store data by copies, retention policy will never delete single <strong>incremental backup</strong> copies associated with the <strong>full backup</strong>, as it would break the chain.</em></p></figcaption></figure>

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2Fic2MUuz6h4vlHkgXoNtw%2Fbackup%20chain%20deletion%20OK.png?alt=media&#x26;token=f9d8ef5b-798b-40b9-8b75-7ec0d4c4ce31" alt=""><figcaption><p><em>Even if you exceed the minimum number of copies, the system keeps the chain intact — a full backup cannot be removed if there are still incrementals based on it.</em></p></figcaption></figure>

Configure when to start the cleanup (**unavailable while keeping data infinitely**). Here you can decide when to enforce the retention policy:

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FWF9zRnpJtS26v8CW7hYq%2Fimage.png?alt=media&#x26;token=b527ae17-c88c-4e57-80b7-412bb4796b42" alt=""><figcaption></figcaption></figure>

1. **After the backup** — cleanup runs only when a new backup version is created and saved to storage.
2. **Before the backup** — outdated versions are removed when a new backup starts.
