> For the complete documentation index, see [llms.txt](https://docs.cheddah-development.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cheddah-development.net/plugin-documentaion/cozy-claims/migration.md).

# Migration

## Migrating from GriefPrevention

This page is only for servers moving existing data from GriefPrevention and optional GPFlags/BanFromClaim installations. Fresh CozyClaims installations should not run these commands.

{% hint style="danger" %}
Make a complete backup of all claim-plugin data and test the migration on a copy of the server first.
{% endhint %}

### What is preserved

The migration tooling is designed to import and validate:

* Claims and land areas
* Ownership and member trust
* Claim-block balances
* Compatible GPFlags claim settings
* BanFromClaim bans
* Existing CozyClaims names, icons, and pins where applicable

Source files are read-only during `/claimsadmin migrate`.

### Source paths

Default paths are relative to the server's `plugins` folder:

```yaml
migration:
  griefprevention-data-folder: GriefPreventionData
  banfromclaim-data-file: BanFromClaim/data.dat
```

Change these paths if the source data is elsewhere.

### Recommended process

1. Stop the production server and make a full backup.
2. Copy the server to a test environment.
3. Install CozyClaims alongside the legacy plugins.
4. Confirm `engine.claim-authority` is still `legacy` for the migrated installation.
5. Run `/claimsadmin migrate`.
6. Review the summary and the detailed report in `plugins/CozyClaims/migration-reports`.
7. Correct every validation failure and rerun the migration. Re-running is designed to be idempotent.
8. Run `/claimsadmin cutover` only after validation passes.
9. Run `/claimsadmin removalcheck`.
10. Remove the legacy plugins only when every removal check passes, then restart and test again.

Legacy subdivisions cannot be represented as independent native claims. If validation reports subdivision blockers, review them carefully. `/claimsadmin cutover --discard-subdivisions` explicitly discards imported subdivision records and their subdivision trust rows; it does not remove parent claim areas. Use it only after confirming that loss is acceptable.

### Diagnostic commands

* `/claimsadmin shadowstats` reports legacy/native comparison counters.
* `/claimsadmin removalcheck` verifies whether legacy claim plugins can be removed.
* `/claimsadmin cleanupnames` cleans stale legacy claim-name entries when GriefPrevention data is available.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cheddah-development.net/plugin-documentaion/cozy-claims/migration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
