Expand my Community achievements bar.

curl command to check if an online backup is completed successfully.

Avatar

Level 1

I know the backup progress txt file is one way to confirm it, but I am wondering if there is another way more reliable, not just see if there is an ongoing backup, but really see if the backup job is completed and completed successfully.

2 Replies

Avatar

Community Advisor

Hi @mh158 ,

Please check below command

curl -s -u "admin:admin" http://localhost:4502/system/console/jmx/com.adobe.granite:type=Repository | grep -ie 'BackupInProgress\|BackupProgress\|BackupWasSuccessful' | sed -e "s/<[-a-zA-Z=\'?.\{\}&;:\/, ]*>/ /g" | sed -e 's/^ *//g' | sed 's/ */ /g'

Additionally, you may track it through backup console here: 

https://<*hostname*>:<*port-number*>/libs/granite/backup/content/admin.html

where a progress bar will indicate the progress of the backup.

For more details please refer [0].

[0]: https://experienceleague.adobe.com/docs/experience-manager-64/administering/operations/backup-and-re...

Hope that helps!

Regards,

Santosh

Avatar

Level 1

Thank you, Santosh.

 

I made a curl command to check related values and tested on AEM 6.5 with Service Pack 6.5.8.

 

curl -s -u "admin:admin" http://localhost:4502/system/console/jmx/com.adobe.granite:type=Repository | grep -ie 'BackupInProgress\|BackupProgress\|BackupWasSuccessful' | sed -e "s/<[-a-zA-Z=\'?.\{\}&;:\/, ]*>/ /g" | sed -e 's/^ *//g' | sed 's/ */ /g'

 

Here is the output.

 

BackupInProgress false
BackupProgress 0
BackupWasSuccessful true

 

I think this serves my purpose.