Keep the right IDs across background tasks.
Recent revisions are kept. Restoring one creates a new revision.