Change rollback
Change rollback is a way of responding to vandalism and to 'mistakes' (which are not considered vandalism but which can be responded to with the same tools) to an older version of the data. This is also known as reverting.
Undoing deletions
See Undoing deletions for the special case of just deletions.
Use editors
JOSM
- JOSM has 'undo' functionality which allows for work to be reverted to a previous state. However, this feature can only go back as far as the point at which the data was downloaded into the program.
- Another option for undoing changes in JOSM is to use the Undelete plugin. This plugin can be used to undelete deleted relations, ways, and nodes, eliminating the need for manual methods.
- Alternatively, you can generate an automatic revert .osm file using the osm-revert tool and then import it into JOSM for manual review and corrections.
If you already uploaded your changes, the Reverter plugin can be used to roll back a changeset. Please be careful though - it's possible to damage other mappers' work if a revert is attempted the wrong way (and make a subsequent revert more difficult). If in doubt, ask for help in a contact channel (like IRC, the "help" site, or mailing list).
Use web-based tools
Revert UI
An established, web-based changeset reverter for undoing small changes.
osm-revert
A web-based changeset reverter with automatic conflict resolution and no size limits.
Use revert scripts
A changeset is a group of edits made within a certain time by one user. It makes it easy to identify and deal with a problematic set of changes (such as a large-scale movement of nodes and ways or vandalism). Revert scripts use changesets in order to identify the changes to be reverted. However, changesets are not automatically revertable. Nor are all traces of the reverted changes removed from the database. Instead, the revert script will produce the same result as if someone examined the reverted changesets and manually changed all of the changed items back to the state in which they had been before.
Revert scripts are available to undo entire changesets, but should only be used if you know what you are doing. In fact most people should seek help or ask the authors of the script to run them in a particular area. These scripts do not have safety nets. Be sure that you feel confident to fix anything you might break. Never do this unless you are absolutely sure that the edit in question is either malicious or accidental. When in doubt, discuss things on the mailing list before you act.
Clean and dirty reverts (conflicts)
A clean revert can be executed when none of the objects in the changeset have been changed in the mean time. In this case the revert will not have any side effects. A dirty revert occurs when some of the data to be reverted has been changed in the meantime, resulting in a conflict.
- Currently the revert script doesn't revert dirty objects by default (but this is switchable inside the script). See the Original Changesets and Reverts Proposal 2008#Reverts and Revert scripts for more information.
- The JOSM reverter plugin handles dirty reverts interactively, which is effective but can be very time consuming.
- The osm-revert is the only tool that can automatically resolve dirty reverts out-of-the-box.
Reverting data that has been subsequently edited by other mappers is inherently a difficult problem, and requires careful analysis of what those subsequent mappers have done. Were they just trying to "fix" broken data (for example, by making connections in OSM between imaginary roads and real ones), or were they adding new on-the-ground features that OSM doesn't want to lose?