04 66 72 51 22

“The storage medium is locked”: the backup refuses to start

This page is intended for administrators who see a backup fail or refuse to start with a locked media message. It explains why a backup media can be blocked when nothing appears to be running, how long to wait, and how to release it safely. It applies to the BeBackup 7 agent and the BeBackup 7 server.

Symptom

The backup does not start, or it fails a few seconds after starting. The agent or the report displays this message:

The media is locked, probably because a backup, a restore or a verification is in progress.

In some cases, the message is different:

The media is being released: the previous session was waiting for a reconnection that never came. Please try again in … seconds.

The message may be preceded by the server name, for example An error occurred on server ….

Cause

A backup media accepts only one job at a time. When a job starts, the server locks the media. It releases it when the job ends. As long as the lock is held, any other job on that media is refused.

The lock may be held by a job you cannot see from the workstation:

  • a restore in progress from this media;
  • a media verification, running or waiting its turn;
  • a media synchronisation to secondary storage, running or pending;
  • a replication to another BeBackup server;
  • an Office 365 backup, which runs on the server without an agent;
  • a previous backup whose agent lost its connection.

Verifications wait their turn

Verifications of media located in the same storage run one after the other. A verification waiting its turn already holds the media lock.

If that verification is waiting at the end of a backup and a new backup from the same agent arrives, the server yields the media to it: it returns the second message, and the verification is postponed. A backup is still refused, however, when the verification has already started, when it comes from another account or another machine, or when it was launched outside the end of a backup.

The previous session is waiting for the agent

If the connection is cut during a backup, the server keeps the session open and waits for the agent to return. By default, this wait lasts up to two hours (120 minutes, adjustable from 5 to 300 minutes in the server configuration). During this time, the media remains locked. This happens when:

  • the workstation was restarted or put to sleep during a backup;
  • the agent service was stopped during a backup;
  • the network or the VPN (Virtual Private Network) was cut.

If a new job is requested on this media during the wait, from the same account and the same machine ID, the server terminates the previous session. Coming from another account or another machine, the job remains refused until the end of the wait. In the first case, the server then returns the second message, which indicates how many seconds to wait before retrying. The data already transferred is kept. The next backup resumes where the previous one stopped.

Checks

Carry out these checks in order.

  1. If this is a scheduled backup, wait for the automatic retry: the agent retries on its own every 15 minutes, for 12 attempts in total. In most cases, no action is required. A backup started manually, from the agent or via Start backup in the web interface, is never retried: run it again yourself once the media is free.
  2. Check the media status in the web interface dashboard. The Verifications in progress, Pending verifications, Pending synchronisations, Synchronisations in progress, Media in use, Backups in progress and Restores in progress blocks, along with those for replications and Office 365, indicate a legitimate job. Wait for it to finish.
  3. Check that another backup of the same media is not already running. Two schedules set too close together on the same profile produce this message.
  4. If the workstation was restarted or the agent service was stopped during a backup, wait for the reconnection timeout to expire, or request a new backup. The server then releases the media and indicates the delay before retrying.
  5. If the media appears in the Locked media block of the dashboard while no job is running, the lock is probably orphaned. Go to the next section.

Resolution

Orphaned lock

An orphaned lock is a lock whose job no longer exists, for example after an abrupt server shutdown. By default, the server detects it and removes it on its own the next time the media is opened.

You can also remove it yourself:

  1. In the web interface, open the provider's list of computers.
  2. Select the media concerned.
  3. In the actions menu, choose Unlock media, then confirm.

This action only removes the lock if the job that set it no longer exists. It cannot terminate a running job. When the lock is held by a job that is still alive, it does nothing and gives no indication of this: if the media remains in Locked media, a job is still holding it.

After an orphaned lock, the server checks the media at the start of the next job, because the media was not closed correctly. This check is quick. Files whose transfer was interrupted are not offered for restore. Their transfer resumes at the next backup.

Stalled job

If a job really is running but no longer progressing, first try a clean stop: Stop on the Processes page, or Stop backup in the actions menu. A clean stop closes the media and releases the lock.

If the clean stop does not succeed, force the stop:

  1. In the list of computers, select the media.
  2. In the actions menu, choose Force stop of the running job, then confirm.

This action terminates the job immediately, without completing it properly. Use it only when you are sure the job is no longer progressing and the clean stop has failed.

Unlock media and Force stop of the running job are always shown in the menu, but each requires a permission on your account: Run the command to unlock media and Run the command to kill a running job (or Run all commands). Without this permission, the server refuses the action after the click. In that case, request the permission from your BeBackup administrator.

Preventing the problem from recurring

  • Space out the schedules of profiles that write to the same media.
  • Do not restart the workstation or stop the agent service during a backup.
  • If several media share the same storage, schedule their verifications at times when no backup is planned.

If the problem persists

If the message returns on every attempt for more than two hours, and no job appears in the dashboard, contact BeBackup support. Include:

  • the media name and the times of the refused attempts;
  • the report of the last backup of this media;
  • the agent service log, bbAgent-service.log, located in the agent installation folder.

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.