Skip to main content

Restore v6.1

A restore runs as a job of its own on the printer, after the request that starts it has been answered. It first unpacks the backup while the printer keeps going, then stops the printer software and the web interface, puts the restored data in place, and starts them again. Printing stops while the data is put in place. Depending on the size of the backup, the restore takes from seconds to several minutes.

The REST API keeps running throughout, so Get the restore state can follow the restore to the end. The other endpoints need the printer software, and fail while it is stopped.

Network settings are not affected by a restore.

Restore a backup​

Start restoring a backup file (.mb), as downloaded from Tools > Backup in the web interface.

Request​

POST http://printer/api/v3/restore

Query Parameters​

NameTypeDescription
filterStringOptional comma-separated list of what to restore: settings, files (labels, images, tables etc.), users (users and passwords), and history (print counts and ink history). Without a filter, settings, files and users are restored, but not the history.

Headers​

NameTypeDescription
Content-TypeStringapplication/zip or application/octet-stream with the backup file as the body, or multipart/form-data with the backup file in the field file.

Body​

The backup file.

Response​

Status 202 Accepted once the backup has been checked and the restore has started, with:

NameTypeDescription
idstringID of the restore.
statestringpreparing.

The restore goes on after the response is sent. Use Get the restore state to see how it went.

The request fails with:

StatusDescription
400 Bad RequestThe filter is invalid, the request has no backup file, the file is empty or not a backup, the backup was made with a newer minor version than the printer runs (a newer patch version is fine), or there is not enough free space to restore it.
409 ConflictA restore or a software update is already in progress. This is checked before the backup file is received.
415 Unsupported Media TypeThe Content-Type is not one of the above.

Get the restore state​

Request​

GET http://printer/api/v3/restore

Response​

NameTypeDescription
statestringidle when no restore is in progress, preparing while the backup is unpacked and the printer keeps going, and applying while the restored data is put in place and the printer software is stopped.
idstringID of the restore in progress, or null when idle.
lastResultobjectResult of the last restore to finish, or null if there is none.

The result has the following values:

NameTypeDescription
idstringID of the restore.
okbooleanWhether the restore succeeded.
committedbooleanWhether the restored data was put in place. A restore that failed before that, or was interrupted by a power loss before that, left the printer as it was. One that failed after it leaves the restored data in place, but the history as it was, unless the history had been completely restored.
errorstringWhy the restore failed, or null if it succeeded. interrupted for a restore that was interrupted before the data was put in place.
missingExtensionsarrayThe extensions that the backup has settings for, but that are not installed, as objects with name and version. The version is an empty string when the backup does not say.
finishedstringWhen the restore finished, in ISO 8601 format in UTC.

Example​

{
"state": "idle",
"id": null,
"lastResult": {
"id": "0b6f0c55-3a8e-4d3c-9d61-5f0c4a9d2e7b",
"ok": true,
"committed": true,
"error": null,
"missingExtensions": [],
"finished": "2026-11-05T09:12:44+00:00"
}
}

Examples​

Restore the settings and files of a backup:

POST http://printer/api/v3/restore?filter=settings,files
Content-Type: application/zip

<backup file>

With Python, restoring a backup and waiting for the restore to finish:

import time
import requests

url = 'http://192.168.1.1/api/v3/restore'

with open('backup.mb', 'rb') as f:
rsp = requests.post(
url = url,
params = {'filter': 'settings,files'},
headers = {'Content-Type': 'application/zip'},
data = f)
rsp.raise_for_status()
restore_id = rsp.json()['id']

while True:
time.sleep(2)
state = requests.get(url).json()
result = state['lastResult']
if state['state'] == 'idle' and result and result['id'] == restore_id:
break

if not result['ok']:
print('Restore failed:', result['error'])

With curl:

curl --data-binary @backup.mb -H 'Content-Type: application/zip' \
'http://192.168.1.1/api/v3/restore?filter=settings,files'