AA-2489: Support On-Demand Backups
Review Request #710 — Created March 13, 2025 and submitted — Latest diff uploaded
| Information | |
|---|---|
| apoorva.sn | |
| AMP | |
| AA-2489 | |
| Reviewers | |
| pmurugaiyan, prajesh, shuinvy | |
Problem
Support of Backup functionality on AMP
Solution
Have made changes to support backup of postgres DB, Influx DB and SQLite file and also the running configuration on AMP.
Creating a tar file with these and storing it under /var/backups so that users are able to download it locally for now.
Created API for starting backup job and also to get the status of the ongoing backup
API to start backup
- POST https://192.168.162.162:8888/backup/start
Response:
{
"message": "Backup started!"
}
- GET https://192.168.162.162:8888/backup/status
Response when backup is in progress{
"message": "Backup In-progress!"
}Response when completed
{
"message": "Backup Completed!",
"Download url": "https://192.168.162.162:8888/backup/download?filename=backup_20250313_150909.tar.gz"
}
- GET https://192.168.162.162:8888/backup/download?filename=backup_20250313_150909.tar.gz
to download the backup file
