Manager Restore

Steps

  1. Transfer backup archive and restore script.
  2. Prepare for restore.
    # Make restore script executable
    chmod +x /root/restore_manager.sh
  3. Run restore script.
    # Run restore (as root)
    ./restore_manager.sh /home/admin/amdp_mgr_backup_20251209_100000.tar.gz
  4. Follow interactive prompts.
    The script will:
    1. Extract and validate the backup archive.
    2. Display the backup manifest.
    3. Check if TTS configuration and ht_token exist.
    4. Check database existence and status.
    5. If database is not empty, prompt for action:
      WARNING: Database 'triage-www' is not empty (contains XX tables)
      
      Choose an option:
        1) Empty the database and continue with restore
        2) Cancel restore
      
      Enter your choice (1/2):
      1. Choose 1 to empty the database.
      2. If you choose 1, you'll need to type DELETE ALL to confirm

    Expected Output:

    [2025-12-09 14:00:00] ===================================================
    [2025-12-09 14:00:00] Starting AMDP On-Prem Manager Restore Process
    [2025-12-09 14:00:00] ===================================================
    [2025-12-09 14:00:00] Backup archive: /home/admin/amdp_mgr_backup_20251209_100000.tar.gz
    [2025-12-09 14:00:00] Target OS: Ubuntu 24.04
    ...
    [2025-12-09 14:35:00] Restore completed successfully!
    [2025-12-09 14:35:00] ===================================================
    [2025-12-09 14:35:00] Log file: /root/amdp_mgr_restore_20251209_140000.log
    [2025-12-09 14:35:00] 
    [2025-12-09 14:35:00] Next steps:
    [2025-12-09 14:35:00]   1. Reboot the system to ensure all services start cleanly
    [2025-12-09 14:35:00]   2. Test AMDP functionality
  5. Reboot manager.
  6. Test AMDP functionality after connecting to an engine.