Maintenance
Managing R2R versions, updates, and database migrations across environments.
Deployment Management
R2R deployments consist of three main components that need to be managed:
- The R2R Python package
- The Docker images
- The database schema
Version Management
Check your current R2R version:
Update R2R
Update your R2R installation to the latest version:
This command will:
- Upgrade the R2R package to the latest version using pip
- Display the update progress and confirmation
- Show any errors if they occur during the update process
When you update R2R, the Docker image used by r2r serve
will automatically be updated to match the new version. The system will attempt to use a version-specific image (e.g., ragtoriches/prod:1.2.3
) or fall back to latest
if the specific version isn’t available.
Database Management
R2R uses database migrations to manage schema changes across versions. After updating R2R, you should always check and update your database schema:
Check Current Migration
View the current migration state of your database:
Apply Migrations
Upgrade your database to the latest version:
Deployment Process
Here’s the recommended process for updating an R2R deployment:
-
Prepare for Update
-
Stop Running Services
-
Update R2R
-
Update Database
-
Restart Services
Managing Multiple Environments
For different environments (development, staging, production), use different project names and schemas:
Vector Index Management
R2R uses vector indices to enable efficient similarity search across documents. For detailed information about managing vector indices, including creation, listing, and deletion, see the Ingestion documentation.
Key vector index management commands:
Troubleshooting
If issues occur during deployment:
-
Generate a system report:
-
Check container health:
-
Review the database state:
-
If needed, roll back database changes: