This is one of the big issues for Badges from an LMS.
Firstly, if you strategry for running Moodle means you wipe users and courses(data) each year, then you lose some of the information on badges.
A badge is not just for a semester, its for life. So you need to have an ongoing strategy.
For example, in 2 years time if someone is to verify that badge - it should still work if it is to have meaning.
So perhaps swap to a yearly moodle site so each year becomes an archive.
2015.mydomain.com for example so the badge/course/students stay working, always..
Or do not issue any public badges through your teaching Moodle at all and use a system outside of your live teaching Moodle that will always exist - for example, if you have a dedicated Moodle site just for issuing badges use the https://moodle.org/plugins/view.php?plugin=block_badgeawarder Badge awarder plugin to mass issue badges in the dedicated badge site so it never gets reset each year.
Of course, there are solutions that can improve how Moodle handles badges
the badge issuiong could be not linked to any live course or user data, just a log of the badge issued, so if they course, or user is gone from system it still can show
this badges "archive" or dataset could be exportable and importable so you can move last years issued badges into the new this years site, or even other systems..
Just some random thoughts on it