Skip to main content

OpenSearch Migration Tool

A unified web application for managing OpenSearch snapshots and migrations with a clean, professional UI.

Features

  • πŸ”§ Register Repository: Register S3 repositories with OpenSearch clusters
  • πŸ“Έ Take Snapshot: Create snapshots of your indices for backup or migration
  • πŸ”„ Restore Snapshot: Restore snapshots to your target OpenSearch cluster
  • 🎨 Clean UI: Professional Material-UI based interface
  • πŸ” Secure: Uses your local AWS CLI credentials and environment variables for secrets

Setup

This guide will help you to setup OpenSearch Migration Tool

Prerequisites

  • Python 3.8+
  • Node.js 18+
  • AWS CLI configured with appropriate credentials
  • Virtual environment (venv) - already created in this project

Configuration

  1. Update .env file with your specific values:

Running the Application

Full Setup and Run

Development Mode (faster, assumes dependencies installed)

Manual Run

Usage

  1. Access the application at http://localhost:8000
  2. Register Repository Tab:
    • Select endpoint type (Old/New OpenSearch cluster)
    • Click β€œRegister Repository” to set up S3 repository
  3. Take Snapshot Tab:
    • Select source endpoint (Old/New cluster)
    • Optionally specify snapshot name (auto-generated if empty)
    • Optionally specify indices (uses default from .env if empty)
    • Click β€œTake Snapshot”
  4. Restore Snapshot Tab:
    • Browse available snapshots or enter snapshot name manually
    • Optionally specify indices to restore
    • Click β€œRestore Snapshot” (always restores to new cluster)

API Endpoints

  • POST /api/register-repo - Register S3 repository
  • POST /api/take-snapshot - Create a snapshot
  • POST /api/restore-snapshot - Restore a snapshot
  • GET /api/snapshots/{endpoint_type} - List snapshots
  • GET /api/health - Health check

Technology Stack

  • Backend: FastAPI with Python
  • Frontend: React + Vite + Material-UI
  • Authentication: Uses local AWS CLI credentials
  • Deployment: Single server serves both API and static frontend

File Structure

Notes

  • The application uses your existing AWS CLI credentials
  • All sensitive configuration is stored in .env
  • The frontend is built and served as static files by FastAPI
  • Single server deployment - no need to run frontend and backend separately