At the moment it looks like sold item restoration is not possible (items sold back to shop are not logged) without doing a full rollback, which isn't likely to happen. Some magic plan might pop up, but don't count on it.
We are planning a number of features to help deal with this kind of problems. You players need to show some sense too though, if you have extra/missing items in your inventory (or your char is doing some other weird stuff), don't go buying/selling new ones - bugs happen and it's easier to avoid hitting them than fix them afterwards.