C7: node-backup backs up and restores a module's kept data on the bus: aside, discard-aside, ended and restored
now, restore and aside are of class act; discard-aside is the operator's alone; ended and restored carry the node, module and kept data in their subject and the module, kept data, form, fingerprint and outcome. Builds: design 47 G §296, §297, §302, §405 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
[
|
||||
{
|
||||
"name": "ended is said, its node, module and kept data in its subject",
|
||||
"of": "event:ended",
|
||||
"subject": "mesh.seat.node-backup.event.ended.ace.plex.library",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"module": "plex",
|
||||
"kept": "library",
|
||||
"form": 2,
|
||||
"fingerprint": "src2:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"outcome": "done"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "restored failed says why",
|
||||
"of": "event:restored",
|
||||
"subject": "mesh.seat.node-backup.event.restored.ace.plex.library",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"module": "plex",
|
||||
"kept": "library",
|
||||
"form": 2,
|
||||
"fingerprint": "src2:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"outcome": "failed",
|
||||
"error": "restore point missing"
|
||||
}
|
||||
}
|
||||
]
|
||||
+213
-4
@@ -8,7 +8,7 @@
|
||||
"verbs": [
|
||||
{
|
||||
"name": "backed-up",
|
||||
"description": "What this machine backs up: each module, what it declared, its last good night, how many restore points are kept and the repository's size.",
|
||||
"description": "What this machine backs up: each module, what it declared, its last good night, how many restore points are kept and the repository's size. Also each module's restore points of its kept data on the bus (the kept data, the form, the fingerprint each was taken before) and the data set aside at each restore, with its size.",
|
||||
"replaces": [
|
||||
"restic snapshots"
|
||||
],
|
||||
@@ -24,7 +24,7 @@
|
||||
},
|
||||
{
|
||||
"name": "now",
|
||||
"description": "Take a backup now, of one module or of every module on this machine — before a migration, a retirement or anything else that could go wrong.",
|
||||
"description": "Take a backup now, of one module or of every module on this machine — before a migration, a retirement or anything else that could go wrong. With kept, a restore point of one kept data on the bus instead, said by the event ended.",
|
||||
"replaces": [
|
||||
"restic backup"
|
||||
],
|
||||
@@ -33,14 +33,42 @@
|
||||
"module": {
|
||||
"description": "one module (optional)",
|
||||
"type": "string"
|
||||
},
|
||||
"kept": {
|
||||
"type": "string",
|
||||
"description": "one kept data of the module on the bus, its local name: its restore point is taken by the bus module's account, of the node holding mesh-broker"
|
||||
},
|
||||
"form": {
|
||||
"type": "integer",
|
||||
"description": "with kept: its form now"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "with kept: the fingerprint the restore point is taken before"
|
||||
},
|
||||
"catch-up": {
|
||||
"type": "object",
|
||||
"description": "with kept: the catch-up tool the newer manifest declares beside it and its arguments whole, recorded in the restore point (design 47 G 299, 406)",
|
||||
"properties": {
|
||||
"tool": {
|
||||
"type": "string"
|
||||
},
|
||||
"arguments": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"tool"
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"class": "act"
|
||||
},
|
||||
{
|
||||
"name": "restore",
|
||||
"description": "Restore one module's data from a restore point BESIDE the live data, never over it: each directory as \u003cpath\u003e.restored-\u003cdate\u003e. Swapping it in is a person's act. Lists the restore points when none is named.",
|
||||
"description": "Restore one module's data from a restore point BESIDE the live data, never over it: each directory as <path>.restored-<date>. Swapping it in is a person's act. Lists the restore points when none is named. With kept, the restore point of one kept data on the bus by its module, kept data and form, the live data set aside and never removed, said by the event restored.",
|
||||
"replaces": [
|
||||
"restic restore"
|
||||
],
|
||||
@@ -57,13 +85,96 @@
|
||||
"snapshot": {
|
||||
"description": "the restore point (from `backed-up`; the newest when omitted)",
|
||||
"type": "string"
|
||||
},
|
||||
"kept": {
|
||||
"type": "string",
|
||||
"description": "one kept data of the module on the bus, its local name: its restore point is taken by the bus module's account, of the node holding mesh-broker"
|
||||
},
|
||||
"form": {
|
||||
"type": "integer",
|
||||
"description": "with kept: its form now"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "with kept: the fingerprint the restore point is taken before"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"class": "act"
|
||||
},
|
||||
{
|
||||
"name": "aside",
|
||||
"description": "Set one module's live kept data on the bus aside under a name of its own and restore nothing, after the node agent stopped the newer build (design 47 G 297, 405); the data set aside is listed by backed-up and removed only by discard-aside.",
|
||||
"class": "act",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string",
|
||||
"description": "the module"
|
||||
},
|
||||
"kept": {
|
||||
"type": "string",
|
||||
"description": "one kept data of the module on the bus, its local name: its restore point is taken by the bus module's account, of the node holding mesh-broker"
|
||||
},
|
||||
"form": {
|
||||
"type": "integer",
|
||||
"description": "with kept: its form now"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "with kept: the fingerprint the restore point is taken before"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"module",
|
||||
"kept",
|
||||
"form",
|
||||
"fingerprint"
|
||||
]
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"aside": {
|
||||
"type": "string",
|
||||
"description": "the name the live data is set aside under"
|
||||
},
|
||||
"error": {
|
||||
"type": "string",
|
||||
"description": "why it failed; set alone"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "discard-aside",
|
||||
"description": "Remove data a restore set aside, on a person's call alone; writes the act, who and why in the hand-act log of the seat mesh-hand-acts.",
|
||||
"callers": [
|
||||
"operator"
|
||||
],
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "the aside's id, as backed-up lists it"
|
||||
},
|
||||
"why": {
|
||||
"type": "string",
|
||||
"description": "why"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"why"
|
||||
]
|
||||
},
|
||||
"class": "act"
|
||||
}
|
||||
],
|
||||
"receives": [
|
||||
@@ -77,5 +188,103 @@
|
||||
"comment": "#",
|
||||
"dirs": true
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "ended",
|
||||
"subject": "ended.<node>.<module>.<kept>",
|
||||
"body": {
|
||||
"type": "object",
|
||||
"description": "a restore point of a kept data on the bus taken, done or failed",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout's version"
|
||||
},
|
||||
"module": {
|
||||
"type": "string",
|
||||
"description": "the module"
|
||||
},
|
||||
"kept": {
|
||||
"type": "string",
|
||||
"description": "the kept data"
|
||||
},
|
||||
"form": {
|
||||
"type": "integer",
|
||||
"description": "its form"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "the fingerprint"
|
||||
},
|
||||
"outcome": {
|
||||
"enum": [
|
||||
"done",
|
||||
"failed"
|
||||
]
|
||||
},
|
||||
"error": {
|
||||
"type": "string",
|
||||
"description": "why it failed"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"v",
|
||||
"module",
|
||||
"kept",
|
||||
"form",
|
||||
"fingerprint",
|
||||
"outcome"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "restored",
|
||||
"subject": "restored.<node>.<module>.<kept>",
|
||||
"body": {
|
||||
"type": "object",
|
||||
"description": "a kept data on the bus restored from its restore point beside the live data, done or failed",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout's version"
|
||||
},
|
||||
"module": {
|
||||
"type": "string",
|
||||
"description": "the module"
|
||||
},
|
||||
"kept": {
|
||||
"type": "string",
|
||||
"description": "the kept data"
|
||||
},
|
||||
"form": {
|
||||
"type": "integer",
|
||||
"description": "its form"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "the fingerprint"
|
||||
},
|
||||
"outcome": {
|
||||
"enum": [
|
||||
"done",
|
||||
"failed"
|
||||
]
|
||||
},
|
||||
"error": {
|
||||
"type": "string",
|
||||
"description": "why it failed"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"v",
|
||||
"module",
|
||||
"kept",
|
||||
"form",
|
||||
"fingerprint",
|
||||
"outcome"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user