The documentation here is for an unreleased version of Recyclarr.
Visit the documentation site for the Current Version instead.recyclarr state repair
Usage
recyclarr state repair [resource] [OPTIONS]
Description
Repairs state mappings by matching configured resources to existing resources in the service by name. This is useful when:
- State was accidentally deleted or corrupted
- Migrating Recyclarr to a new machine
- Relocating a Sonarr/Radarr instance to a new URL
- Fixing incorrect state mappings caused by case-variant names in the service
- Adopting manually-created custom formats into Recyclarr management
The command matches your configured resources (from YAML) against resources in the service using case-insensitive name matching. It does not process resources that aren't in your configuration.
Examples
# Preview what state repair would do for all instances
recyclarr state repair --preview
# Repair state for a specific instance
recyclarr state repair -i my-radarr
# Repair state with verbose output showing all states
recyclarr state repair --verbose
# Repair state and adopt manually-created CFs that match by name
recyclarr state repair --adopt
# Repair only custom format state entries
recyclarr state repair custom-formats
# Repair only quality profile state entries
recyclarr state repair quality-profiles
Arguments
[resource]
The resource type to repair state for. If omitted, all resource types are processed.
Valid values:
custom-formats- Repair custom format state mappingsquality-profiles- Repair quality profile state mappings
Options
Visit Common Options to read about options usable by all commands.
-i|--instance
One or more instance names to process. Can be specified multiple times to process specific instances. If omitted, all instances defined in your configuration are processed.
# Process two specific instances
recyclarr state repair -i my-radarr -i my-sonarr
-p|--preview
Show what changes would be made to the state without actually saving them. Use this to verify the repair results before committing changes.
-v|--verbose
Show detailed output including state file paths and per-item state information. Useful for troubleshooting or understanding exactly what the command is doing.
--adopt
Take ownership of existing resources in the service that match configured resources by name. Use this when you have manually created resources that you want Recyclarr to manage going forward.
Without this option, resources that exist in the service but aren't in the state are reported as
"Not in service" (meaning they would be created on the next sync). With --adopt, these are added
to the state so Recyclarr will update them instead of creating duplicates.
Output
The command displays results grouped into two sections:
Changes (state modifications made):
- Added - New state entries created for resources found in service
- Corrected - State entries updated with correct service ID
- Removed - Stale entries deleted (service resource no longer exists)
Summary (informational, no state change):
- Unchanged - State entries already correct
- Not in service - Configured resources not found in service (will be created on next sync)
- Preserved - Non-configured state entries kept for deletion tracking
- Ambiguous - Multiple service resources match the same name (error condition)
Ambiguous Matches
If the service contains multiple resources with the same name (differing only in case, such as "HULU" and "hulu"), the command reports an ambiguous match error. To resolve this, you must manually delete or rename the duplicates in Sonarr/Radarr so each name is unique.