adityamparikh opened a new issue, #224:
URL: https://github.com/apache/solr-mcp/issues/224

   ### Current state (verified)
   No backup or restore capability. SolrJ 10.0.0 provides 
`CollectionAdminRequest.backupCollection`, `.listBackup`, `.restoreCollection` 
with `setRepositoryName`, `setLocation`, and `Restore.setBackupId` (verified on 
`apache/solr` `main`).
   
   ### Motivation
   The Solr Operator's `SolrBackup` CR takes scheduled backups by calling 
BACKUP against a repository declared in `SolrCloud.spec.backupRepositories[]`. 
Pointing solr-mcp at the same repository lets an agent list and restore what 
the operator produced, without either side calling the other.
   
   ### Scope
   New package `org.apache.solr.mcp.server.backup` with `BackupService`:
   
   | Tool | Arguments | Hints |
   |---|---|---|
   | `backup-collection` | `collection`, `repository`, `name`, `location?` | 
`idempotentHint=false` |
   | `list-backups` | `repository`, `name`, `location?` | `readOnlyHint=true` |
   | `restore-collection` | `repository`, `name`, `targetCollection`, 
`backupId?`, `location?` | `destructiveHint=true` |
   
   ### Implementation notes
   - `repository` is the `<repository name="…">` from `solr.xml`; on Kubernetes 
that is `SolrCloud.spec.backupRepositories[].name`. Solr has no API to 
enumerate repositories, so the description must state where valid values come 
from.
   - Operator naming, for the description and docs: each backup is named 
`<SolrBackup name>-<collection>`, incremental, retention via 
`recurrence.maxSaved` (default 5). (Verified in operator v0.9 docs.)
   - `restore-collection` **refuses** an existing `targetCollection`. No 
overwrite flag. Restore under a new name, then swap the alias (see the alias 
tools in #159).
   - Backups are async on the Solr side; return the request id / status and 
document that `list-backups` confirms completion.
   
   ### Acceptance
   - [ ] Testcontainers with a `LocalFileSystemRepository` on a volume shared 
by both nodes: backup `films` → `list-backups` shows it → `restore-collection` 
into `films_restored` → doc counts match.
   - [ ] `restore-collection` into an existing collection fails with a clear 
message.
   - [ ] README tables updated; a short docs section on using operator-created 
backups.
   
   ### Depends on
   Land after #160 (threat model) so the destructive tool is covered by it.
   
   Part of the Kubernetes / Solr Operator integration tracking issue.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to