schemas.rst (1546B)
1 ======= 2 Schemas 3 ======= 4 5 There are two sets of JSON schemas used by the BackupService. One schema is used 6 for the ``backup-manifest.json`` file that gets inserted into a compressed backup 7 archive, and the other is for the JSON block that exists alongside the 8 compressed backup archive. 9 10 There is a similar ``meta`` property between both schemas. This property is for 11 the metadata about a backup (including information about the time of the backup, 12 and the machine / build that the backup was created on). There is admittedly 13 some redundancy here where this same metadata exists in the JSON block as well 14 as the backup manifest, but this redundancy helps to protect against accidental 15 (or intentional) corruption of a backup. 16 17 The drawback of this redundancy is that the schema for the metadata must be 18 maintained in lock-step between both the backup manifest and the JSON block. 19 20 This is done by defining the metadata structure separately within the 21 backup manifest schema, and _referring_ to that structure within both the 22 backup manifest schema and the JSON block schema. 23 24 This implies that the version numbers between both schemas are also maintained 25 in lock-step. This means that there is a global ``SCHEMA_VERSION`` defined inside 26 of ``ArchiveUtils`` that represents the current schema version for both the 27 backup manifest as well as the JSON block. 28 29 So this means that when you develop a new version of one schema, you must 30 also generate a new schema for the other using the same version number, even 31 if that second schema has not changed.