Content Migration from higher to lower environments (AEMaaCS)
Hi all,
I have a java service to create a package everyday on the basis of given query, this runs in PROD environment and the package is getting created (there is a scheduler to trigger this service everyday at 1 AM).
I want to download the same package from PROD, in DEV environment. As all the environments are AEMaaCS tried to download,upload and install the packages using java is seeming impossible. I have tried to run curl command using java itself to download, upload and install the package. It runs fine in local and package is getting installed in local server. But the same code to download the package is getting EXIT CODE : 23 in DEV.
Here is the code snippet of curl command runner using java to download the package
// Download page package from remote env
ProcessBuilder pageDownloadProcessBuilder = new ProcessBuilder("bash", "-c",
String.format("curl -u %s:%s %s%s --output %s", queryUser, QUERY_PASSWORD, authorUrl, pagePackagePath, PAGE_PACKAGE_NAME));
Process pageDownloadProcess = pageDownloadProcessBuilder.start();
pageDownloadProcess.waitFor();
int pageDownloadExitCode = pageDownloadProcess.exitValue();
logger.info("pageDownload Exit Code : {}", pageDownloadExitCode);
pageDownloadProcess.destroy();the actual curl command runs is :
curl -u user_name:user_pwd https://<prod_url>/etc/packages/my_packages/myPackage.zip --output myPackage.ziperror :
2023-05-22 12:00:00.164 INFO [com.myproject.core.services.impl.CurlJavaServiceImpl] pageDownload Exit Code : 23Any input would be helpful. Thanks in advance.