My new colleague pointed me in the right way while I was scripting waaaaay too much to create a backup of the Weblogic users and groups.
The easiest way is to use the daily backup which is created by weblogic itself.
The backup is located on de adminserver, in this location:
If there’s an issue with your embedded ldap, you can stop the adminserver, restore these files to this location:
To change the ldap backup settings, log in to the console and navigate to this page:
[your_domain] >> Tab Security >> Subtab Embedded LDAP >> Review the area marked below.