AA-2491: Restore Backups

Review Request #730 — Created March 19, 2025 and submitted — Latest diff uploaded

apoorva.sn
AMP
amp_3_7
AA-2491
pmurugaiyan, prajesh, shuinvy

Problem

Restore backup given the backup file

Solution

Have introduced new endpoint /restore/start to restore the backup from file to the system
Since this is happening as part of same process returning the response as part of same API once restore is completed

Introduced new API /restore/status to get the status of the restore in case when user 1st logs into the system and also might move away from the page

https://192.168.162.141:8888/restore/start
backup_file = backup_20250312_195045.tar.gz
Rsponse:
{
"message": "Restore completed."
}

https://192.168.162.162:8888/restore/start
backup_file=AMP_Bug_Scrubbing_May_2024.xlsx

Response:
{
"message": "Invalid file type. please upload file with extention tar.gz",
"error": 405
}

https://192.168.162.162:8888/restore/status

Response:
when there are no logs from previous restore
{
"status": "N/A",
"message": "No logs found"
}

when currently restore is in progresss
{
"status": "In-Progress",
"message": "Restore in Progress!"
}

when restore is completed successfully
{
"status": "Completed",
"message": "Restore Completed Successfully at 2025-03-25 14:51:20 - Restore completed"
}

    Loading...