Skip to content

docs: document the backup/restore ZIP archive format#604

Open
irfanuddinahmad wants to merge 2 commits into
openedx:mainfrom
irfanuddinahmad:irfanuddinahmad/document-backup-restore-format-492
Open

docs: document the backup/restore ZIP archive format#604
irfanuddinahmad wants to merge 2 commits into
openedx:mainfrom
irfanuddinahmad:irfanuddinahmad/document-backup-restore-format-492

Conversation

@irfanuddinahmad

Copy link
Copy Markdown
Contributor

Summary

  • Adds docs/openedx_content/backup_restore.rst — a full reference page for the TOML-based ZIP format produced by lp_dump / create_zip_file and consumed by lp_load / load_learning_package.
  • Covers archive layout, all TOML file schemas with field-level descriptions, annotated examples drawn from the test fixtures, XBlock XML placement, and quick-start snippets for both management commands and the Python API.
  • Links the new page from docs/openedx_content/index.rst.

Closes #492

Test plan

  • cd docs && make html (or make dirhtml) — confirms RST renders without Sphinx warnings
  • Spot-check that the TOML examples match the test fixtures under tests/openedx_content/applets/backup_restore/fixtures/library_backup/
  • Run lp_dump on a real library and compare the output ZIP layout to the documented structure

🤖 Generated with Claude Code

Adds a reference page describing the TOML-based ZIP format produced by
`create_zip_file` / `lp_dump` and consumed by `load_learning_package` /
`lp_load`.  Covers the full archive layout, every TOML file schema with
field-level descriptions and annotated examples drawn from the test
fixtures, the XBlock XML placement convention, and quick-start usage
snippets for both the management commands and the Python API.

Closes openedx#492

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Jun 8, 2026
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @irfanuddinahmad!

This repository is currently maintained by @axim-engineering.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@github-project-automation github-project-automation Bot moved this to Needs Triage in Contributions Jun 8, 2026
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Ready for Review in Contributions Jun 8, 2026
@mphilbrick211 mphilbrick211 requested a review from ormsbee June 8, 2026 19:19
@farhan farhan requested a review from Copilot June 9, 2026 09:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds official documentation for the ZIP-based learning-package backup/restore format used by the backup_restore applet, and links it into the openedx_content docs section so operators and developers can understand and inspect archives produced/consumed by lp_dump / lp_load.

Changes:

  • Add a new reference page documenting the archive layout and TOML/XML schemas used in backup ZIPs.
  • Include export/restore quick-start examples for both management commands and the Python API.
  • Link the new page from the docs/openedx_content index.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
docs/openedx_content/index.rst Adds the new backup/restore format page to the openedx_content docs toctree.
docs/openedx_content/backup_restore.rst New documentation page describing the backup ZIP layout and file formats.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/openedx_content/backup_restore.rst Outdated
Comment thread docs/openedx_content/backup_restore.rst Outdated
Comment thread docs/openedx_content/backup_restore.rst Outdated
Comment thread docs/openedx_content/backup_restore.rst Outdated
Comment thread docs/openedx_content/backup_restore.rst Outdated
Comment thread docs/openedx_content/backup_restore.rst Outdated
Comment on lines +124 to +125
``[learning_package]`` — library data (restored to the database):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Updated the section heading to: "library data (restored to the database, with caveats: key may be overridden by the caller and updated is not applied during restore)".

Comment thread docs/openedx_content/backup_restore.rst
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: Ready for Review

Development

Successfully merging this pull request may close these issues.

Document backup/restore format

4 participants