# How diagrams are saved Worth five minutes if you ever need to debug a diagram, migrate one, or explain the storage model to a security reviewer. --- ## A save writes in two places ![Data Save Process](https://help.gocapable.com/images/att1423998992.svg) --- ## The two records | **Record** | **Holds** | **Lives** | | ------------------------- | ------------------------------------------------------ | ---------------------------------------------- | | **Custom content** | The diagram source itself, plus its language. | In your Confluence site, attached to the page. | | **The macro on the page** | A pointer to that source, its title, and a hash of it. | In the page body. | The hash is how the page knows whether the picture it is showing still matches the source. If they disagree, the diagram is re-rendered rather than showing something stale. ℹ️ **This is also why diagrams survive an uninstall.** The source is ordinary Confluence content in your own site, so it is backed up, restored and exported with everything else. --- ## A few things that follow from this * Copying a page copies the source too, so the copy is independent. Editing one does not change the other. * Deleting a page deletes its diagram source with it, the same as any attachment. * Page permissions govern the diagram. If you can read the page, you can see the diagram. See [Security and privacy](https://help.gocapable.com/diagrams/security-and-privacy.html). --- ## Related [How diagrams workThe wider render path.](https://help.gocapable.com/diagrams/overview.html) [Security and privacyWhat leaves your site.](https://help.gocapable.com/diagrams/security-and-privacy.html) [TroubleshootingWhen the two records disagree.](https://help.gocapable.com/diagrams/troubleshooting.html) --- _Two records, one truth, kept in step by a hash._