How to specify delay parameter while taking online backup using curl on AEM 6.2 | Community
Skip to main content
shab_ravi
Level 2
November 3, 2016
Solved

How to specify delay parameter while taking online backup using curl on AEM 6.2

Hi,

Could anyone let me know how to specify the delay parameter in the curl command while taking online backup on AEM v6.2.

The I use for AEM 5.6 is as follows :

/usr/bin/curl -u admin:${PASSWORD} --data "delay=0&force=false&target=${DEST}/AEM_${ID}_${DATE}.zip" http://${SERVER}:${PORT}/libs/granite/backup/content/admin/backups
.html

Could someone let me know the equivalent for AEM 6.2 please.

The one I have for 6.2 is :

/usr/bin/curl -u admin:${PASSWORD} -X POST http://${SERVER}:${PORT}/system/console/jmx/com.adobe.granite%3Atype%3DRepository/op/startBackup/java.lang.String?target=${DE
ST}/AEM_${ID}_${DATE}.zip

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Sham_HC
Sham_HCAccepted solution
Level 10
November 3, 2016

in cron job you need to call 2 curl command. One to set delay & next is to take a backup.

curl -u admin:admin -X POST http://localhost:4502/system/console/jmx/com.adobe.granite:type=Repository/a/BackupDelay?value=0

5 replies

shab_ravi
shab_raviAuthor
Level 2
November 10, 2016

Thank you Sham , this works perfectly ...

Translate
shab_ravi
shab_raviAuthor
Level 2
November 3, 2016

Sham HC wrote...

in cron job you need to call 2 curl command. One to set delay & next is to take a backup.

curl -u admin:admin -X POST http://localhost:4502/system/console/jmx/com.adobe.granite:type=Repository/a/BackupDelay?value=0

 

Thank you. 

Translate
Sham_HC
Sham_HCAccepted solution
Level 10
November 3, 2016

in cron job you need to call 2 curl command. One to set delay & next is to take a backup.

curl -u admin:admin -X POST http://localhost:4502/system/console/jmx/com.adobe.granite:type=Repository/a/BackupDelay?value=0

Translate
shab_ravi
shab_raviAuthor
Level 2
November 3, 2016

Am afraid your answer is not quite clear to me. What I am trying to achieve is setup a cronjob to take backup of my instance daily. Could you let me know what parameter to add in the curl command to set delay to zero.

Translate
Sham_HC
Level 10
November 3, 2016

By default there is delay of 10. If you want to change change the attribute BackupDelay on the same mbean DomainName = com.adobe.granite type= Repository

Translate