> For the complete documentation index, see [llms.txt](https://docs.storware.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.storware.eu/deployment/first-steps-after-installation/staging-space-configuration.md).

# Preparing Storage for Staging and Backups

### Overview

Storware Backup & Recovery uses storage for two purposes:

* **Staging space** is a temporary working area used by the Node during backup and restore operations. Depending on the backup strategy, it holds exported data, retrieved backups, or disk images being prepared for restore.
* **Backup destination** stores completed backups for the period defined by the retention policy. Its contents must remain available for restore operations.

Staging and backup storage can use separate disks or separate directories on one filesystem. This chapter describes both configurations using local disks formatted with **XFS**.

<table data-header-hidden><thead><tr><th width="170.50390625"></th><th></th><th></th></tr></thead><tbody><tr><td>Configuration</td><td>Staging path</td><td>Backup destination path</td></tr><tr><td>Separate disks</td><td><code>/vprotect_data/staging</code> — first disk</td><td><code>/vprotect_data/backup</code> — second disk</td></tr><tr><td>One shared disk</td><td><code>/vprotect_data/staging</code> — directory on the shared disk</td><td><code>/vprotect_data/backup</code> — directory on the shared disk</td></tr></tbody></table>

In both examples, configure Storware Backup & Recovery to use these paths after preparing the storage. Creating directories and mounts does not automatically update the application configuration.

## Preparation

### Storage Requirements

Size staging space according to concurrent backup and restore operations. As an initial estimate, use:

**Staging capacity ≈ maximum simultaneous backup threads × size of the largest protected VM**

Size the backup destination according to protected data volume, backup frequency, retention, and expected growth.

When both locations share one disk, provide sufficient capacity for **retained backups and concurrent staging operations together**. Separate directories do not reserve capacity or isolate storage performance.

The `vprotect` account must be able to create, read, modify, and delete files in both locations. Filesystems must be mounted before the Node starts processing tasks.

{% hint style="info" %}
**Important:** Storing staging data and backups on the same filesystem does not automatically eliminate the data transfer performed during the Store phase. This depends on the backup destination configuration and supported workflow.
{% endhint %}

### Before You Begin

Run the commands as `root` on the Storware Backup & Recovery Node. Ensure that XFS utilities are installed.

Identify the disks:

```
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS
```

The examples use `/dev/sdb` and, where required, `/dev/sdc`. Replace them with the correct devices.

{% hint style="warning" %}
**Warning:** Formatting destroys existing data. Use the formatting commands only on disks confirmed to be empty or no longer needed. Skip formatting when reusing a suitable existing filesystem.
{% endhint %}

For an existing deployment, stop backup and restore activity before changing storage. Ensure that the mount-point directories do not contain data that would become hidden by the new mounts.

Complete **one** of the following examples.

### Example 1: Separate Disks

This configuration uses:

<table data-header-hidden><thead><tr><th width="177.98046875"></th><th></th><th></th></tr></thead><tbody><tr><td>Device</td><td>Purpose</td><td>Mount point</td></tr><tr><td><code>/dev/sdb</code></td><td>Staging space</td><td><code>/vprotect_data/staging</code></td></tr><tr><td><code>/dev/sdc</code></td><td>Backup destination</td><td><code>/vprotect_data/backup</code></td></tr></tbody></table>

Separate disks provide independent filesystem capacity for staging and retained backups.

#### 1. Create the Filesystems

```
mkfs.xfs -K /dev/sdb
mkfs.xfs -K /dev/sdc
```

#### 2. Create the Mount Points

```
mkdir -p /vprotect_data/staging
mkdir -p /vprotect_data/backup
```

#### 3. Configure Persistent Mounting

Retrieve the UUIDs:

```
blkid /dev/sdb /dev/sdc
```

Add the following entries to `/etc/fstab`, replacing the placeholders with the corresponding filesystem UUIDs:

```
UUID=<STAGING_UUID> /vprotect_data/staging xfs defaults 0 0
UUID=<BACKUP_UUID>  /vprotect_data/backup  xfs defaults 0 0
```

#### 4. Mount and Verify

```
mount /vprotect_data/staging
mount /vprotect_data/backup
```

Verify that each path is mounted from its intended filesystem:

```
findmnt --mountpoint /vprotect_data/staging
findmnt --mountpoint /vprotect_data/backup
df -h /vprotect_data/staging /vprotect_data/backup
```

Continue with **Configure Permissions and Verify Access**.

### Example 2: One Disk with Separate Directories

This configuration mounts `/dev/sdb` at `/vprotect_data`. Staging and backups use separate directories within that filesystem.

| Device     | Mount point      | Directories            |
| ---------- | ---------------- | ---------------------- |
| `/dev/sdb` | `/vprotect_data` | `staging` and `backup` |

Both directories share the disk’s capacity and performance. If the filesystem becomes full or unavailable, both staging and backup storage are affected.

#### 1. Create the Filesystem

```
mkfs.xfs -K /dev/sdb
```

#### 2. Create the Mount Point

```
mkdir -p /vprotect_data
```

#### 3. Configure Persistent Mounting

Retrieve the UUID:

```
blkid /dev/sdb
```

Add the following entry to `/etc/fstab`:

```
UUID=<FILESYSTEM_UUID> /vprotect_data xfs defaults 0 0
```

Replace `<FILESYSTEM_UUID>` with the returned UUID.

#### 4. Mount the Filesystem

```
mount /vprotect_data
findmnt --mountpoint /vprotect_data
```

Confirm that the expected filesystem is mounted **before creating the subdirectories**.

#### 5. Create the Staging and Backup Directories

```
mkdir -p /vprotect_data/staging
mkdir -p /vprotect_data/backup
```

Verify the filesystem backing each directory:

```
findmnt --target /vprotect_data/staging
findmnt --target /vprotect_data/backup
df -h /vprotect_data/staging /vprotect_data/backup
```

Both paths should resolve to the filesystem mounted at `/vprotect_data`.

### Configure Permissions and Verify Access

Complete these steps for either configuration, after verifying the mounts.

Set ownership and permissions:

```
chown vprotect:vprotect \
  /vprotect_data/staging \
  /vprotect_data/backup

chmod 750 \
  /vprotect_data/staging \
  /vprotect_data/backup
```

Ensure that the `vprotect` account can also traverse `/vprotect_data`.

Test write access to staging:

```
sudo -u vprotect sh -c \
  'testfile=$(mktemp /vprotect_data/staging/.write-test.XXXXXX) && rm "$testfile"'
```

Test write access to the backup directory:

```
sudo -u vprotect sh -c \
  'testfile=$(mktemp /vprotect_data/backup/.write-test.XXXXXX) && rm "$testfile"'
```

Both commands should complete without errors.

{% hint style="info" %}
**Important:** If a filesystem is not mounted, its mount-point directory may still exist. Writing to that directory can fill the underlying system filesystem. Verify the mounts after reboot and before processing tasks.
{% endhint %}

## Additional Backup Destinations

For information about other supported backup destination types and their configuration, refer to the **Backup Destinations** chapter.
