Skip to content

docs(migration): say which volumes the backup actually covers - #18626

Merged
JinHai-CN merged 2 commits into
infiniflow:mainfrom
MarMarLabs:docs/migration-volume-coverage
Aug 25, 2026
Merged

JinHai-CN merged 2 commits into
infiniflow:mainfrom
MarMarLabs:docs/migration-volume-coverage

Conversation

@MarMarLabs

@MarMarLabs MarMarLabs commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

migration.sh help describes backup as a backup of all RAGFlow data volumes. It backs up four, fixed at migration.sh:15:

VOLUME_BASES=("mysql_data" "minio_data" "redis_data" "esdata01")

Nothing in the script reads DOC_ENGINE, and esdata01 is only where the indices live when DOC_ENGINE=elasticsearch. docker/.env also offers infinity, opensearch and serenedb, whose indices live in infinity_data, osdata01 and serenedb_data (docker-compose-base.yml:405-409). None of those are ever considered, and CI exercises the infinity path (sep-tests.yml), so this is not a hypothetical configuration.

What a user on one of those engines sees today:

  1. backup finds no <project>_esdata01, prints ⚠️ Warning: Volume ... does not exist, skipping..., then prints 🎉 Backup completed successfully!. The warning names Elasticsearch, which is easy to read as "not applicable to me" rather than "your index is not in this backup".
  2. Because that volume was skipped, es_backup.tar.gz is never written.
  3. restore checks for every file in BACKUP_FILES first and exits on any that is missing (migration.sh:228-235), so the restore refuses to run at all.

So the backup does not round-trip for any non-default document engine, and that is only discovered at restore time, which is the worst moment to discover it.

This PR does not change what is backed up. It corrects the all claim and states the consequence where a reader is deciding whether this script is sufficient:

DOCKER VOLUMES (with default project name 'docker'):
  - docker_mysql_data     (MySQL database)
  - docker_minio_data     (MinIO object storage)
  - docker_redis_data     (Redis cache)
  - docker_esdata01       (Elasticsearch indices)

  Those four are the whole set. DOC_ENGINE chooses where your indices live,
  and only 'elasticsearch' keeps them in docker_esdata01. Under 'infinity',
  'opensearch' or 'serenedb' the index volume is not part of this backup, and
  because no es_backup.tar.gz is written, a later 'restore' stops on the
  missing file. Back up the index volume separately until that is handled.

Making the script engine-aware is the real fix, but it is a design decision (which volume to select per engine, what a cross-engine restore should mean, and that oceanbase/seekdb use bind mounts rather than named volumes) and it would touch the same perform_restore area as the open #18393 and #18433. I have filed that separately as #18628 rather than pre-empting it here; this PR is only the documentation half and conflicts with neither.

Verified against upstream/main at e9cace9a. bash -n docker/migration.sh passes and the rendered help is the block quoted above.

The help calls backup a backup of "all RAGFlow data volumes", but VOLUME_BASES
is a fixed set of four and only covers Elasticsearch among the document engines
DOC_ENGINE offers. Under infinity, opensearch or serenedb the index volume is
never read, the run still reports success, and the omission only surfaces later
when restore stops on the es_backup.tar.gz that was never written.

State the real coverage and name the consequence at the point where a reader is
deciding whether this script is enough.
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. 📖 documentation Improvements or additions to documentation labels Aug 21, 2026
@coderabbitai

coderabbitai Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 575a9a39-5639-4fce-b054-d701742833b2

📥 Commits

Reviewing files that changed from the base of the PR and between e9cace9 and 16185c7.

📒 Files selected for processing (1)
  • docker/migration.sh

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The migration script help text now lists the covered backup volumes and documents separate index-volume backup requirements for non-Elasticsearch document engines.

Changes

Migration backup documentation

Layer / File(s) Summary
Backup scope and restore guidance
docker/migration.sh
The help output describes the explicitly backed-up volumes and explains that non-Elasticsearch engines require a separately created index backup for restore.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 16185

This change clarifies which volumes the migration backup covers and warns users about unsupported document-engine volumes; it does not alter runtime behavior, so no actionable merge-blocking risk remains.

Poem

A rabbit checks the backup plan,
Four volumes hop into the van.
Elasticsearch keeps its index near,
Other engines need one packed separately here.
Restore now knows what to bring.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the documentation change to identify the volumes covered by backups.
Description check ✅ Passed The description includes the required Summary section and clearly explains the problem, scope, impact, and validation.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@myf-bee myf-bee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

it is Looks Good To Me

@JinHai-CN
JinHai-CN merged commit 57f25ea into infiniflow:main Aug 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📖 documentation Improvements or additions to documentation size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants