Copy content from one site to another site in same dotCMS instance

40 views
Skip to first unread message

Ryan O'Dell

unread,
Apr 17, 2023, 5:16:43 PM4/17/23
to dotCMS User Group
I would like to copy content between sites within the same dotCMS instance.

Site A and Site B.

I need to maintain persistence in Site A and Site B.

Site B was originally a copy of Site A.

I would like to copy the content from Site A to Site B from time to time, overwriting if any changes made to the copied content in Site B.

Site A is effectively a master for some content.

Site B can have it's own additional content, but anything that was copied from Site A would be able to be reset in the next copy from Site A.

I've tried using bundles, but since the Identifiers refer back to Site A, it doesn't update Site B at all.

I've tried setting up a Push Publishing target to Site B (using the direct URL for Site B), but that gets caught in some kind of loop, it doesn't finish.

Does anybody know of a way to copy content between sites in the same dotCMS instance?  (I appreciate it might mean editing the downloaded bundle).

Thanks,
Ryan

jonathan...@dotcms.com

unread,
Apr 19, 2023, 1:48:10 PM4/19/23
to dotCMS User Group
Not sure about the override rules you mentioned, but something I used to is:

1) run copy action over the content to create a copy contentlet
2) move the copied contentlet (again with wf action) to another site (you can type //sitename/mypath)

It will just move the copied content to the other site, but not will consider merges or similar

Best,
J

Reply all
Reply to author
Forward
0 new messages