Skip to content

chore: CrowdSec config export is ~38 MB because it includes the hub cache #1532

Closed

Description

@Wikid82

What: ExportConfig (backend/internal/api/handlers/crowdsec_handler.go) walks the whole CrowdSec data directory with no filter, so the downloaded .tar.gz includes regenerable content such as hub_cache/ and data/. In the E2E container the export is about 38 MB. The snapshot/restore code added in #1525 already excludes these (IsEngineOwnedPath).
Suggested approach: reuse the snapshot exclusion rules for export so the download is just configuration, and make sure re-importing an export still works (import already tolerates missing hub data). Decide separately whether exports should include secrets (kept out of scope here).
Found while working on #1526. Severity: low.

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

Metadata

Metadata

Assignees

Labels

backendServer-side codecrowdsecCrowdSec integration

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions