Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

feat(project): add project export and import MVP - #1998

Draft
Malte Janz (MalteJanz) wants to merge 12 commits into
mainfrom
feat/project-export-import-mvp
Draft

Malte Janz (MalteJanz) wants to merge 12 commits into
mainfrom
feat/project-export-import-mvp

Conversation

@MalteJanz

@MalteJanz Malte Janz (MalteJanz) commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Note

Pretty much WIP / Draft state. May be splitted up into multiple PRs later.

What changed?

Adds an MVP of project export and project import. They move the database and the files of the public and private filesystems between instances as one archive, using the layout from the ADR.

  • Export: --skip-database, --skip-public-files and --skip-private-files choose what goes into the archive. The dump flags (--anonymize, --clean, --limit, ...) are shared with project dump. Skipping files also removes their media rows; rows that reference them are dropped or unlinked according to their foreign keys.
  • Import: prints a plan with the source and target Shopware versions and warns if they differ. It asks for confirmation before writing; --force skips the prompt and is required when the command can't prompt. --dry-run only prints the plan.
  • Works with local, Docker and single-host SSH environments. Only the local filesystem adapter is supported.
$ shopware-cli project import shop-export.tar.gz
Archive: shop-export.tar.gz (Shopware 6.7.1.0, created 2026-11-25 10:24 UTC)
Target: environment "local" (docker, /path/to/my-shop) (Shopware 6.7.1.0)

Database: replace the tables included in the archive
Public files: replace media and thumbnails
Private files: replace all private files

⚠ Import replaces shop credentials such as the admin password
  Review credentials and live integrations (payment, shipping, apps) before using the copy

Replace data in environment "local" (docker, /path/to/my-shop)?
> No
  Yes

Why?

project dump only covers the database. Restoring a shop elsewhere also needs its media and private files, such as invoices.

How was this tested?

TBA, will need some extensive testing by others as well.

Related issue or discussion

Closes #1957

Follow up todo's

  • Update docs

AI Disclosure

This PR was created with AI Assistance from Claude Opus 5.5 (high effort).

@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@codecov-commenter

Codecov Comments Bot (codecov-commenter) commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 48.10345% with 301 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.47%. Comparing base (c880cab) to head (f6833f8).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
cmd/project/project_import.go 2.67% 109 Missing ⚠️
cmd/project/project_export.go 8.57% 64 Missing ⚠️
internal/projectarchive/export.go 56.12% 43 Missing ⚠️
cmd/project/project_dump.go 26.19% 31 Missing ⚠️
internal/projectarchive/environment.go 76.28% 23 Missing ⚠️
internal/projectarchive/archive.go 75.86% 14 Missing ⚠️
internal/projectarchive/import.go 82.25% 11 Missing ⚠️
internal/shop/dump.go 44.44% 5 Missing ⚠️
internal/executor/ssh.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1998      +/-   ##
==========================================
- Coverage   69.71%   69.47%   -0.24%     
==========================================
  Files         541      550       +9     
  Lines       36770    37393     +623     
==========================================
+ Hits        25633    25978     +345     
- Misses      11137    11415     +278     
Flag Coverage Δ
go-test 69.47% <48.10%> (-0.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MVP: portable project export / import archives

2 participants