Groovy Console on Production

Avatar

Avatar
Validate 1
Level 1
karthik4
Level 1

Likes

2 likes

Total Posts

30 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
karthik4
Level 1

Likes

2 likes

Total Posts

30 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
karthik4
Level 1

28-07-2020

I need to content migrate all pages that has an existing legacy component to migrate it to a new component structure (total nodes found, more than 1000). My plan is to run the groovy script on production author, then to tree-activate the entire tree structure.

 

Is it best practice to Groovy Console on Production author, then to replicate from Production author?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 250
MVP
ChitraMadan
MVP

Likes

272 likes

Total Posts

165 posts

Correct reply

67 solutions
Top badges earned
Boost 250
Establish
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Boost 250
MVP
ChitraMadan
MVP

Likes

272 likes

Total Posts

165 posts

Correct reply

67 solutions
Top badges earned
Boost 250
Establish
Ignite 1
Give Back 5
Give Back 3
View profile
ChitraMadan
MVP

28-07-2020

Hi @karthik4,

 

The answer to your question is yes, you can run groovy script directly on production author and then replicate the content from there.

Technically, there is no problem in that but just because this is the production environment, it would be best to take the backup of the author instance, just in case if something goes wrong, you can go back to the previous state.

 

Another option is to copy the content of the production to a lower environment, run the script there and package the content from lower environment and deploy it to production. Here, you will have to make sure that while you are doing this, content authors should not be doing any content changes on the production environment, else once you will upload the updated content, their changes can be lost.

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
MVP
Nirmal_Jose
MVP

Likes

119 likes

Total Posts

207 posts

Correct reply

58 solutions
Top badges earned
Validate 1
Establish
Coach
Contributor
Shape 1
View profile

Avatar
Validate 1
MVP
Nirmal_Jose
MVP

Likes

119 likes

Total Posts

207 posts

Correct reply

58 solutions
Top badges earned
Validate 1
Establish
Coach
Contributor
Shape 1
View profile
Nirmal_Jose
MVP

28-07-2020

If your content synchronisation frame is robust and you can easily bring the production content to a lower environment,  I would suggest to 

1. Bring production content into a lower environment.

2. Install & execute the groovy script to update the nodes. 

3. Capture the node paths while executing

4. Create a package with the nodes, use https://aem.redquark.org/2019/05/create-package-in-aem-from-excel-file.html

5. Install the package in production.

 

This way, you can keep the release vehicle to production AEM streamlined as packages itself.