Clokeep Clokeep Docs
Documentation API Reference
RestoresRestore many accounts at once
Restores View as Markdown

Restore many accounts at once

Restore many Plesk subscriptions or cPanel accounts of one server in one go, follow the batch, and stop it.

Restore accounts restores many hosting accounts of one Plesk or cPanel server with one set of choices. Clokeep queues one restore after another, so you do not wait and click for each account. Use it to roll a server back, or to bring back many deleted accounts.

It covers hosting accounts only. Files, Email and Database plans are restored one by one. See Restore files, email and databases.

Prerequisites

  • The Admin or Operator role. A Viewer can follow a batch but cannot start or stop one. See Users and roles.
  • Plesk or cPanel support switched on for your client by Clokeep, and the agent installed on the server.
  • No other restore batch running on the server. A server runs one batch at a time.
  • An agent recent enough for what you restore. When it is too old, Restore accounts is disabled and says "The agent on … is too old for restores. Update it first." See Agent updates.

Start a batch

Open the form

Open the server's page and click Restore accounts. The button is disabled while a batch runs on the server.

Choose the backups

Under Backups to use, keep The newest backup of each account, or pick The newest backup at or before a date and set the date and time. The time is in your time zone.

Choose the accounts

Accounts lists every account that can be restored, with the date of the backup it gets. All are ticked. Untick the ones to leave out. Accounts that are no longer on the server are listed too, so you can bring them back.

Cannot be restored lists the other accounts with the reason, for example "No backup at or before that date".

Choose what to restore

Tick the components under Restore. None is ticked to start with. The choices are the ones of a single restore, and they apply to every account in the batch. See Restore a Plesk or cPanel account.

  • Files go to each account's own folder.
  • Databases: every database of each backup is restored. Restore databases decides whether they go into new databases or over the originals. See Where the databases go.
  • Mail: messages already on the server are kept, unless you switch on Overwrite messages that already exist.
  • Settings: on their own they are only placed on the server. Switch on Apply the settings to the server to bring back accounts that were deleted.

Confirm

Read the text above Type the server's name to confirm. It says how many accounts will be restored and what is overwritten, and it changes as you change the choices. Type the server's name exactly, then click Restore accounts.

On cPanel, the same switch rolls every account that still exists back to its backup: configuration, mailboxes and passwords. On Plesk, a subscription that still exists keeps its settings and passwords unless you also switch on Also roll back a subscription that still exists.

Where the databases go

Restore databases offers:

  • Into new databases (name_restored), the default: each database is restored as its name followed by _restored. The original stays untouched.
  • Over the original databases: each original is emptied first, then the backup is imported into it.
  • Decide for each account: shown only when Settings is ticked and Apply the settings to the server is on.

Switching on Apply the settings to the server selects Decide for each account, unless you already picked Over the original databases. With it, the databases of an account that was missing from the server at the last account sync go over the originals: applying the settings re-creates that account with empty databases, and the data goes back into them. Every other account still exists with live data, so its databases go into new name_restored databases.

A notice under Restore databases counts how many of the ticked accounts were missing at the last sync. The choice for each account is made when the batch starts, from the accounts as the last sync left them. An account deleted since the last sync counts as still there and gets new databases.

Into new databases (name_restored) and Over the original databases apply to every account in the batch.

Over the original databases empties each database before the import, on every account in the batch, also on accounts that still exist.

The batch's page shows the choice under its choices, for example "databases over the originals for accounts missing at the last sync, into new ones for the others".

Which backup an account gets

Each account gets its newest backup that can be restored, or its newest one at or before the date you set.

  • When an account's newest backup cannot be restored, its earlier backups are tried, up to ten, newest first. The form shows the date of the backup that is used.
  • When the file list of its newest backup cannot be read from storage, no earlier backup is offered in its place.
  • On a plan that backs up each component separately and incrementally, a backup stores nothing for files or mail that did not change. The batch restores those from the earlier backup of the same chain, so the account comes back whole.
  • A backup that was partly made on another server, before its plan or account moved, is not used. Restore that account from Browse Backups.

How a batch runs

Accounts are restored one after another, in the order of their domain names. For one account, the settings come first, then files, databases and mail.

  • The next restore is queued as soon as the previous one ends. Each one is an ordinary restore run, and you find it in Backup Runs with a link to its batch.

  • An account that cannot be restored does not stop the batch. It is marked Failed or Skipped with the reason, and the batch moves on.

  • With Apply the settings to the server on, an account whose settings were not restored has its files, databases and mail skipped, with the reason "The account could not be recreated."

  • While the batch runs, a single restore on the same server is refused. The message names the batch.

  • A server with a running batch cannot be moved to another client.

  • Scheduled backups keep running during a batch. Retention does not delete a backup that the batch still has to restore, nor the earlier backups of its chain. Retention can prune them once the batch has ended.

Follow a batch

Open Restore batches in the menu, or the Restore batches tab on the server's page, and click the batch.

  • Progress counts per account: restored, restored with warnings, failed, skipped, cancelled and left.
  • The list shows each account with its backup, status, reason and a link to its restore run. Once the batch has ended, failed and skipped accounts come first.
  • The page refreshes every five seconds while the batch runs.

The page also says what the batch is waiting for:

The page says What it means
Waiting for the agent since … The agent has not checked in recently. The restore starts when it does. There is no time limit, so stop the batch if the server stays away.
Waiting for the storage to answer since … The file list of the next account's backup could not be read. The batch tries again every minute. After 30 minutes that account fails. The later accounts whose backups are on the same storage then fail at once, with the reason "Not tried: the storage of an earlier account in this batch did not answer for 30 minutes." Accounts on another storage still run.
Waiting for another restore on this server to end A restore that was queued before the batch is still running. The next account starts once it has ended.

A batch ends Completed when every account was restored. It ends Completed with failures when an account failed, was skipped or was cancelled. When restores were cancelled but none failed, the page says "No account failed".

Stop a batch

On a running batch's page, click Stop batch and confirm.

  • No further account is restored. The accounts not reached are marked Cancelled.
  • A restore that is still queued is cancelled at once.
  • A restore that already started is asked to stop, as a single stop does. It first finishes what it must not interrupt. Until the agent reports, the page says "Stopping: waiting for the restore that is running to end".
  • The batch then ends Stopped. A stopped batch cannot be resumed. Start a new one for the accounts that are left.

What a stopped restore leaves on the server is on Restore files, email and databases.

Force end a stop the agent never answers

When the agent goes away during a restore, the batch can stay at "Stopping" for good. An Admin can then end it by hand.

Force end shows on the batch's page when both are true:

  • the stop was asked at least 15 minutes ago;
  • the agent has reported nothing on the running restore for 15 minutes.

Click Force end and confirm. The running restore is marked Cancelled, the accounts not reached are cancelled, and the batch ends Stopped. Nothing is sent to the agent, and what it may already have written on the server stays as it is. If the agent reports later, its report is refused.

A single restore that was stopped has the same Force end button on its run page, under the same rules.

Use it only when the server is really gone. An agent that still sends progress cannot be force ended: wait for it to stop.

Suspending a client stops its batches too. Deleting a server deletes its batches with it.

Retry failed accounts

Once a batch has ended Completed with failures or Stopped, click Retry failed accounts on its page. It starts a new batch for the accounts that failed, were skipped or were cancelled, with the same choices.

  • Each account gets its newest backup again, or its newest one at or before the batch's date. That can be newer than the first time.
  • Each account is restored again whole, with every chosen component, also when part of it was restored the first time.
  • With Decide for each account, the retry decides again for each account, from the accounts as the last sync left them. An account the first batch re-created gets new databases once a sync has seen it on the server.
  • The form says how many accounts are restored and what is overwritten. Type the server's name to confirm.
  • Accounts deleted from Clokeep since are left out, and so is an account that has no backup to use now. The message after the start says how many were left out.

A batch can be retried once. To try again, retry the new batch. The button is disabled while another batch runs on the server.

Use the API

The same batches can be started and followed over the REST API. Starting, stopping and retrying need a token that can write.

Leave out database_mode to decide for each account, as Decide for each account does. That applies only with settings in components and apply_settings on. Without them, every account gets new. Send new or overwrite to apply it to every account. The batch's choices then show "database_mode": "per_account", and database_modes gives each account's mode, keyed by hosting account id:

"choices": {
  "components": ["settings", "files", "databases", "mail"],
  "apply_settings": true,
  "rollback_live": false,
  "database_mode": "per_account",
  "database_modes": {"17": "overwrite", "18": "new"},
  "mail_overwrite": false
}

For any other mode, database_modes is an empty list [].

as_of takes an ISO 8601 date, or a date and time, for example 2026-11-20T23:00:00+02:00. Send the offset to avoid any doubt about the time zone. It cannot be in the future. A server that already runs a batch, or a batch that was already retried, answers 409. Force end is in the panel only. See API tokens.

Alerts

A batch sends one alert, not one per account. It goes out under the Restore failed event, so your routing for that event applies. See Alerts.

  • A batch that ends with failed or skipped accounts sends one alert. It names up to 20 accounts with their reason and links to the batch's page.
  • A batch where accounts were only restored with warnings sends one alert at warning level.
  • A stopped batch sends an alert only when accounts failed before the stop.

Next steps

Esc
↑↓to navigate↵to openEscto close