You can iterate all entities and save the whole data using a memcpy(buff, ent, sizeof(ENTITY)) into a buffer, then write this buffer into a file.
You will need some sort of ID system, but thats the easiest approach possible.