How a sync decides
calsync keeps no database. Each run it reads your calendars and works out what is missing, changed or left over.
One run
- List. It reads each calendar for the next 120 days. Events that already ended are ignored.
- Find the real events. A real event is one calsync did not make. Declined events and cancelled events are not real events, so they are skipped.
- Work out the wanted copies. Each writable calendar should hold one copy of every real event from every other calendar, apart from the exceptions below.
- Compare. It finds the copies already there by their private tag. It creates the missing ones, updates the changed ones and deletes copies whose original is gone, declined or cancelled.
The tag is the state
Every copy carries a private tag that only calsync reads. The tag is how calsync finds its own work next time. Nothing else is stored, so there is nothing to migrate and nothing to lose. calsync only ever edits or deletes events that have its tag.
Exceptions
- Already there by invite. If a meeting is on a calendar through a shared invite, it is not copied there again.
- Don't copy X here. A calendar can skip another by name. Events from that source are not copied to it.
- Never write to this calendar. It is a source only. calsync never writes to it.
- Copies here only say Busy. Copies on that calendar have no title or location.
- Private events. Copies of private events always say Busy, on every calendar.
What a copy looks like
- The same start and end as the original.
- The original's title and location, unless Busy only or a private event hides them.
- No reminders, so you are not alerted more than once.
- A repeating event shows up as separate copies, one per occurrence in the window.
What stops a run
- A calendar does not load
- That calendar is left alone this run. Nothing is deleted because of it.
- A very large delete
- If a run would delete more than half of a calendar's copies, and more than 10, it stops for that calendar and waits. If the delete is what you meant, run
calsync run --force. - Preview
- Preview changes on the page, or
calsync run --dry-run, goes through the same steps and changes nothing.