Documentation: ContentSync plugin
Removed articles and incremental sync
Copying new and changed articles is half the job. A mirror also has to deal with articles that disappear, and on a large site it should not ask for everything every time. The options in this article are part of the PRO edition. Force Resync is in both editions.
Articles that are removed from the source
In the free edition, a copy stays on the target site when its original is removed. Nothing happens to it.
In PRO you decide. Switch on Handle Deleted Articles and choose under Action for Removed Articles what happens to the copy:
- Move to Trash - the default. The copy goes to the trash of the target site, where you can still get it back.
- Unpublish - the copy stays, but visitors no longer see it.
- Permanently Delete - the copy is deleted, with its tags and field values. This cannot be undone.
What counts as removed
ContentSync compares the articles it copied before with the articles the source hands over in this run. A copy whose original is not in that list any more counts as removed.
That is wider than deleted. An article also counts as removed when:
- it was unpublished on the source, while your state filter asks for published articles;
- it was moved to a category that your filter does not include;
- you narrowed a filter in the task yourself.
For a mirror this is usually exactly what you want: what is no longer shown on the source is no longer shown here. But it means a change to a filter can touch many copies at once. Do a dry run first. The log lists every article it would trash, unpublish or delete.
There is one safety net: when the source hands over no articles at all in a run, nothing is treated as removed. An unreachable or empty answer does not wipe your copies.
Incremental sync
A normal run asks the source for every article that passes the filters, and then skips the ones that did not change. On a site with thousands of articles that is a lot of asking.
With Incremental Sync on, the task only asks for articles that were modified since its last successful run. It remembers that moment in Last Sync Watermark (UTC), which it fills in by itself.
Incremental Overlap (minutes) moves that moment a little back in time, to allow for clocks that are not exactly equal on the two servers. The default of 10 minutes is a safe choice.
Two things to know
- It needs Joomla 6.2 or newer on the source site. An older source ignores the question and hands over everything. See Joomla 5 and Joomla 6.
- An incremental run does not handle removed articles. It only sees what changed, so it cannot tell what is gone. The log says so when both options are on.
To get both, use two tasks for the same source: one incremental task that runs often, and one full task with Handle Deleted Articles that runs once a day or once a week. Or clear the watermark field now and then, which makes the next run a full one.
Force Resync
Force Resync makes one run process every article again, whether it changed or not. The switch turns itself off after that run.
Use it after you changed something that applies to articles that were already copied:
- a mapping for categories, tags, authors or access levels;
- switching on custom fields, or documents and media;
- the HTML filter or link rewriting.
A forced run overwrites every copy with the source version. Changes made by hand on the target site are lost.