Skip to main content
dinesh_sundaram
Level 3
Jun 22, 2017 7:28 PM UTC
Solved

AEM 6.3 backup curl command with source,target paths and delay

Can somebody share the working curl command to take backup in AEM 6.3, need to give source directory(repository directory), target directory and delay.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
KunwarsalujaAccepted solution
Adobe Employee
Jun 26, 2017 3:52 AM UTC

Can't you use the JMX bean for backup ? You should be able to create a curl command for that mbean

11 replies

smacdonald2008
Level 10
Jun 22, 2017 7:37 PM UTC

To backup AEM data - follow the AEM docs here: Backup and Restore

Translate
dinesh_sundaram
Level 3
Jun 22, 2017 7:48 PM UTC

Thanks, it does not meeting my requirements, I used the below curl command in 6.1 which is not working in 6.3, can you help.

/usr/bin/curl -ku admin:admin --data "delay=0&force=true&installDir=/apps_01/webapps/crx-quickstart&target=/apps_01/backups/6_3_online_backup/crx-quickstart" "/libs/granite/backup/content/admin/backups"

Translate
dinesh_sundaram
Level 3
Jun 23, 2017 2:43 PM UTC

we used to automate using the above curl command in 6.1 but it breaks in 6.3, can you please advice what can be done here.

Translate
KunwarsalujaAdobe EmployeeAccepted solution
Adobe Employee
Jun 26, 2017 3:52 AM UTC

Can't you use the JMX bean for backup ? You should be able to create a curl command for that mbean

Translate
dinesh_sundaram
Level 3
Jun 26, 2017 3:19 PM UTC

there is no jmx mbean with these 3 inputs(source,target and delay).

Translate
dinesh_sundaram
Level 3
Jun 26, 2017 3:25 PM UTC

also, I'm trying to use this jmx mbean which has source and target input alone. but not sure how to pass those two inputs. can you advice.

/system/console/jmx/com.adobe.granite:type=Repository/op/startBackup/java.lang.String,java.lang.String

Translate
Level 2
Jun 26, 2017 3:45 PM UTC

what is the error you are getting ?

Translate
dinesh_sundaram
Level 3
Jun 26, 2017 3:46 PM UTC

I found a way to pass source and target, anyhow jmx already have another curl command to set delay alone, I will use that, thanks for your time and support.

Translate
you-09089
Sep 7, 2017 8:11 AM UTC

what is the command

Translate
Level 2
Oct 25, 2017 7:01 PM UTC

Hi Dinesh ,

The right URL to use in AEm 6.3 in order to invoke a backup using a curl command is

curl -u $CQ_USER:$CQ_USER_PASSWORD -X POST -F "target=$CQ_BACKUP_FOLDER/" -F "force=true" -F "delay=1" http://$HOST:$PORT/libs/granite/backup/content/createBackup/content/items/backupform.html

Translate