Media verification remains “pending”
This page is intended for BeBackup server administrators who see checks waiting a long time before they start. It explains why checks run one after another, and how to tune this queue according to your disks. It applies to BeBackup server 7.
Symptom
In the web interface dashboard, one or more media remain in the Pending checks block. Meanwhile, a backup of these media may be refused with the message:
The media is locked, probably because a backup, a restore or a check is in progress.
Cause
A check re-reads all the data on a media. On a hard disk drive, several simultaneous reads are far slower than one read after another. The server therefore places checks in a queue: by default, it checks only one media at a time per storage. The queue is formed per storage path, not per drive letter: two storages located in two folders on the same disk are checked in parallel, unless you group them together (see below).
As long as a check is waiting its turn, the media remains reserved for it. When that check is waiting at the end of a backup and a new backup from the same agent arrives, the server hands the media over to it: the agent receives The media is being released… with a delay in seconds, and the check is postponed. The backup is still refused, however, if the check has already started, if the backup comes from another account or another machine, or if the check was started outside the end of a backup.
A refused scheduled backup is retried automatically by the agent every 15 minutes, for 12 attempts in total. A manually started backup is not retried: start it again once the check has finished.
The queue mainly builds up in these cases:
- many media are stored on the same disk;
- the check rules trigger a large number of checks at the same time;
- a long check, on a large media, holds up the others.
Checks to carry out
- In the dashboard, compare the
Checks in progressandPending checksblocks. If a check is in progress on the same storage, or on a storage grouped with it, the wait is normal. - In the server configuration,
Storagestab, note the path of each storage and the disk hosting it. - Look at the
Media check rulesin the backup settings. A rule that is too frequent produces a permanent queue.
Resolution
Allowing several checks per storage
If your media are on SSDs (Solid State Drives), several checks can run in parallel without slowing down.
In the server configuration, Storages tab, fill in Number of simultaneous checks allowed per drive. Despite its name, this setting expects the full path of each storage, as shown in the Storages tab, followed by the number allowed, separated by commas. A simple drive letter (F:) only matches a storage located at the root of the disk. For example, for a storage F:\BBData on an SSD and a storage D:\BBData on a hard disk drive:
D:\BBData=1,F:\BBData=3
Keep 1 for conventional hard disk drives.
Grouping the storages of a single physical disk
A single physical disk may host several volumes or several storage folders. If they are checked at the same time, they slow each other down. Declare them together in Groups of drives that cannot check media simultaneously. Here too, enter the full path of each storage. Separate the storages within a group with commas, and the groups with semicolons, without spaces. For example, for two storages I:\BBData and J:\BBData on one disk, and two storages on shares of the same server:
I:\BBData,J:\BBData;\\Srv1\Part1\BBData,\\Srv1\Part2\BBData
An entry that does not exactly match the path of a storage is ignored without any message. A letter on its own (F:) only designates a storage located at the root of the disk.
Spacing out the checks
The Media check rules field in the backup settings determines when a media is checked. A rule begins with one of these forms:
CheckEveryXBackups=N: one check every N backups;CheckEveryXBackupDays=N: one check every N days on which there was at least one backup;CheckEveryXDays=N: one check every N days.
Instead of N, you can write a Min-Max range. The server then draws a random value within this range. This spreads media checks out over time, rather than triggering them all on the same day.
After the value, you can add options, separated by commas:
SupportSizeGB=Min-Max: the rule applies only to media whose size, in GB, falls within this range;DayTime=: the rule applies only to certain days and certain hours.D1is Monday andD7is Sunday.H21-H8is the 9 pm to 8 am window.
As soon as your rules use
SupportSizeGB, a media whose size falls within none of the ranges is never checked. Make sure your ranges cover all sizes, for example by ending with a very high upper bound.
The days and hours in DayTime are combined: D6H21-D7H8 covers Saturday and Sunday, each from midnight to 8 am and from 9 pm to midnight. It is not a continuous window from Saturday 9 pm to Sunday 8 am.
Separate several rules with semicolons. For example, to check small media every 2 to 3 backups, and large media every 5 to 7 backups, at night and at weekends only (Saturday and Sunday, before 8 am or after 9 pm):
CheckEveryXBackups=2-3,SupportSizeGB=0-100;CheckEveryXBackups=5-7,SupportSizeGB=100-9999,DayTime=D6H21-D7H8
An incorrectly written rule produces the error Media check rule "…" invalid (E…)., with a code from E1 to E5. In SupportSizeGB, the two bounds must be different.
If the problem persists
If media remain pending while no check is in progress on the same storage or on a storage grouped with it, contact BeBackup support. Specify the media concerned, the location of their storage and the contents of the two settings in the Storages tab.
BeBackup is backup built for IT service providers
Backup and restore of workstations, servers, virtual machines and Microsoft 365, encrypted at source with a key we do not hold, on the hosting of your choice.