Skip to content

Commit ef91e39

Browse files
Irfan Ahmadclaude
authored andcommitted
docs: fix inaccuracies in backup_restore format reference
- Overview: clarify only draft+published versions exported, not full history - origin_server: free-form string, not validated hostname - [learning_package] heading: note key may be overridden, updated not restored - updated field: mark as reference-only, not applied during restore - [entity.published]: always present (empty table with comment when unpublished) - [[version]]: at most 2 entries — draft first, then published if different - Example: fix version order to draft (v5) first, then published (v4) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 132f2c6 commit ef91e39

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

docs/openedx_content/backup_restore.rst

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ Overview
1515
--------
1616

1717
A backup ZIP is a self-contained snapshot of one learning package. It captures
18-
every component, collection, container (sections / subsections / units), static
19-
asset, and version history that existed at export time.
18+
every component, collection, container (sections / subsections / units), and
19+
static asset. For each component and container, only the current draft and
20+
published versions are exported — the full version history is not preserved.
2021

2122
The archive uses `TOML <https://toml.io>`_ for all metadata files and keeps the
2223
actual XBlock content as XML (the same ``block.xml`` format Studio has always
@@ -119,9 +120,10 @@ Located at the root of the archive. Contains two sections:
119120
- UTC timestamp when the archive was created
120121
* - ``origin_server``
121122
- no
122-
- Hostname of the CMS instance that produced the archive
123+
- Free-form string identifying the origin CMS instance (typically a
124+
hostname or URL; stored as-is with no format validation)
123125

124-
``[learning_package]`` — library data (restored to the database):
126+
``[learning_package]`` — library data (restored to the database, with caveats: ``key`` may be overridden by the caller and ``updated`` is not applied during restore):
125127

126128
.. list-table::
127129
:header-rows: 1
@@ -144,7 +146,8 @@ Located at the root of the archive. Contains two sections:
144146
- UTC timestamp when the library was originally created
145147
* - ``updated``
146148
- yes
147-
- UTC timestamp of the library's last modification
149+
- UTC timestamp of the library's last modification (written to the
150+
archive for reference; **not** applied during restore)
148151

149152
Example::
150153

@@ -188,9 +191,14 @@ Each XBlock component gets one TOML file.
188191

189192
``[entity.draft]`` / ``[entity.published]`` — each contains ``version_num``
190193
pointing at the current draft or published ``[[version]]`` entry respectively.
191-
If a section is absent the entity has no draft or published version.
194+
``[entity.draft]`` is absent when the entity has no draft.
195+
``[entity.published]`` is **always present** — when the entity has no
196+
published version it is written as an empty table with an explanatory comment
197+
(see the container example below).
192198

193-
``[[version]]`` — one entry per saved version, in ascending ``version_num`` order:
199+
``[[version]]`` — at most two entries: the current draft version first, then
200+
the current published version if it differs from draft. The full version
201+
history is not stored.
194202

195203
.. list-table::
196204
:header-rows: 1
@@ -223,11 +231,11 @@ Example::
223231

224232
[[version]]
225233
title = "Text"
226-
version_num = 4
234+
version_num = 5
227235

228236
[[version]]
229237
title = "Text"
230-
version_num = 5
238+
version_num = 4
231239

232240
Container entity TOML (``entities/<slug>.toml``)
233241
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)