Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

dinesh_sundaram
Level 3
Level 3

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.

1 Accepted Solution
Kunwar
Correct answer by
Employee
Employee

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

View solution in original post

11 Replies
dinesh_sundaram
Level 3
Level 3

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"

dinesh_sundaram
Level 3
Level 3

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.

Kunwar
Correct answer by
Employee
Employee

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

dinesh_sundaram
Level 3
Level 3

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

dinesh_sundaram
Level 3
Level 3

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

dinesh_sundaram
Level 3
Level 3

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.

anudeepyeleti
Level 1
Level 1

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

important_monke
Level 1
Level 1

Thanks anudeepyeleti --

For me this was the correct answer. It's too bad the mentioned Backup & Restore document does not contain this command, as it's the one most likely required (at least ... it's what I needed). I don't think too many people want a .zip file of their entire repository, when it's hundreds of gigabytes large.

Adobe: Please include the command @anudeepyeleti provided above in the mentioned Backup & Restore document.

Can anyone provide the similar cURL command that will cancel the backup?

Thanks!