Compare Versions and Set Retention
See what changed between two versions of a file, and choose how long old versions are kept.
Comparing two versions
- Open the file's menu and choose Version history.
- Click the compare button on an earlier version. It opens compared with the current version.
- Use the two lists at the top to pick any two versions, including named ones.
- Back to history returns to the list.
At the top you see both versions' details side by side: name, size, type, when they were saved, by whom, and their names if they have them. Anything that differs is in bold.
Text files
Word documents (.docx) and files you can edit in the browser (plain text, Markdown, CSV, JSON, XML, YAML, HTML, CSS, SQL, logs and similar) get a line-by-line comparison of their text. For Word documents only the text is compared, not formatting:
- lines added are green and marked +
- lines removed are red and marked -
- each change has up to three unchanged lines around it, and each block shows where it starts in both versions
- the total lines added and removed is shown above
If the text is the same in both, you're told the versions are identical.
Other files
PDFs, images, spreadsheets, presentations and other files are compared by their details only. Download both versions to compare their contents in the program you normally use.
A very large or completely rewritten text file may also be compared by details only, so the comparison stays fast.
You need Read access to the file to compare its versions.
Retention policy
The retention policy decides how many old versions of each file are kept. It applies to every file in the workspace.
- Versions to keep per file β from 1 to 500. The default is 50.
- Remove versions older than (days) β from 1 to 3650. Leave it blank to keep versions regardless of age.
Named versions are always kept. They are never removed and don't count towards the number kept, so name anything you must keep, like a signed contract or a version sent to a client. See Version History, Trash and Quick Views.
Changing the policy
Only administrators can change the policy.
- Open Version history on any file.
- At the bottom, click Change retention policy.
- Set the values and click Save policy.
The new policy applies straight away across the workspace. You're told how many old versions were removed. Everyone sees the current policy at the bottom of Version history.
When old versions are removed
- Each time a file gets a new version, anything beyond the number to keep is removed for that file.
- Each night, and whenever the policy changes, versions older than the day limit are removed from every file.
Removed versions can't be recovered.
For your IT team
GET /documents/files/:id/versions/compare?from=&to=compares two versions. Usecurrentfor the current version.PUT /documents/files/:id/versions/:versionId/labelnames a version (currentfor the current one); an empty label removes the name.GETandPUT /documents/settings/versionsread and change the policy (keepCount,keepDays). Changing it requires an administrator.- Text comparison has a size cap to protect the server; past it, details are shown instead.
Where to go next
Was this article helpful?