Skip to content

Commit

Permalink
Add documentation for section 3
Browse files Browse the repository at this point in the history
Restoring the same device instance on a different device revision
  • Loading branch information
cristian-recoseanu committed May 7, 2024
1 parent 98215fa commit 7993eef
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions docs/Backup & restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ The [Configuration API](https://specs.amwa.tv/is-14/branches/v1.0-dev/APIs/Confi
These mechanisms are used for enabling backup and restore functionality and this section of the specification aims to cover the expectations, behaviour and requirements for the following scenarios:

- [Performing a backup](#1-performing-a-backup)
- Restoring a backup on the [same device instance and the same device-revision](#2-restoring-same-device-instance-and-the-same-device-revision)
- Restoring a backup on the [same device instance but different device-revision](#3-restoring-same-device-instance-but-different-device-revision)
- Restoring a backup on a [different instance of the same device type using the same device revision](#4-restoring-different-instance-of-the-same-device-type-using-the-same-device-revision)
- Restoring a backup on the [same device instance and the same device revision](#2-restoring-same-device-instance-and-the-same-device-revision)
- Restoring a backup on the [same device instance but different device revision](#3-restoring-the-same-device-instance-on-a-different-device-revision)
- Restoring a backup on a [different instance of the same device type using the same device revision](#4-restoring-a-different-instance-of-the-same-device-type-using-the-same-device-revision)

where `device-revision` means any combination of software versions (this includes firmware) and hardware revision that dictates the functionality of the device.
where `device revision` means any combination of software versions (this includes firmware) and hardware revision that dictates the functionality of the device. This concept helps distinguish the different scenarios covered in this document.

`Note`: This does not mean that the backup & restore functionality can only be used in these scenarios.

Expand All @@ -29,8 +29,11 @@ The `validationFingerprint` is a generic string field (format is implementation
- Software versions
- Hardware revisions
- Backup response hash
- Timestamp
- Whether its a full device model backup or a subset

The `validationFingerprint` might include elements of the `device revision`.

| ![Performing a full backup](images/performing-full-backup.png) |
|:--:|
| _**Performing a full backup**_ |
Expand All @@ -39,9 +42,9 @@ Partial backups can be created by choosing other role paths. The scope of backup

It is RECOMMENDED to store the backup file in its entirety and not remove elements from the data set as they might contain dependencies required by some of the role paths.

## 2. Restoring same device instance and the same device-revision
## 2. Restoring same device instance and the same device revision

Assuming a [full backup](#1-performing-a-backup) of the device was created and is intended to be restored on the same device with the same device-revision then the first step is to perform a [Validation request](https://specs.amwa.tv/is-14/branches/v1.0-dev/docs/API_requests.html#validating-bulk-properties-for-a-role-path) to check if the backup can be successfully restored.
Assuming a [full backup](#1-performing-a-backup) of the device was created and is intended to be restored on the same device with the same device revision then the first step is to perform a [Validation request](https://specs.amwa.tv/is-14/branches/v1.0-dev/docs/API_requests.html#validating-bulk-properties-for-a-role-path) to check if the backup can be successfully restored.

In order to validate the whole device model (validating a full backup), requests MUST use `root` as the `rolePath`.

Expand Down Expand Up @@ -72,7 +75,7 @@ The request body MUST include:

The response MUST include a collection of all target device model role paths with a restore `status` property. For role paths which have a `status` other than `Ok` the response MUST also include a `statusMessage` with details of why the restore failed.

A `full backup` performed and restored on the same device instance with the same device-revision MUST be supported by the device.
A `full backup` performed and restored on the same device instance with the same device revision MUST be supported by the device.

Devices MUST allow the partial restoration of backups which have at least one role path `status` of `Ok` when supplying the `allowPartial` argument of `true` in the request.

Expand All @@ -84,12 +87,22 @@ Devices MUST allow restoration of modified backups (full or partial backups wher

// TBD: Do we think some devices may need to reboot in order to apply a restore?

## 3. Restoring same device instance but different device-revision
## 3. Restoring the same device instance on a different device revision

Devices can undergo device revision upgrades or downgrades during their deployment lifetime. This can lead to backups performed on a `device revision` having to be restored on a different one.

// TBD: Do we want to make this a MUST within the same Major version/revision number?
Restoring follows a similar workflow to [restoring the same device revision](#2-restoring-same-device-instance-and-the-same-device-revision).

| ![Restoring on a different device revision](images/restoring-same-dev-different-dev-rev.png) |
|:--:|
| _**Restoring on a different device revision**_ |

Devices are RECOMMENDED to allow the restoration of backups created on a different device revision than their own.

Devices MUST allow the partial restoration of backups which have at least one role path `status` of `Ok` when supplying the `allowPartial` argument of `true` in the request.

## 4. Restoring different instance of the same device type using the same device revision
## 4. Restoring a different instance of the same device type using the same device revision

// TBD: Is this a MUST?
Facilities can have a multitude of instances of the same device type. Backups performed on a device instance can be used to bootstrap other instances of the same device type.

// TBD: What if the new device overwrites things like IP addresses? Are we saying the restore should be used as a bootstrap mechanism (do we need a isTemplate boolean flag when restoring)?
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7993eef

Please sign in to comment.