Good idea, the easiest way to do this is indeed being able to store a backup with one command, and restore it when needed with a second command.
Rolling back a certain amount of changes would be a more advanced feature, i think that one could be scripted externally if there's extra needed value in that. It should also have an option to review the last number of changes made before rolling back.