Save data to persistent storage.