Store and replace mesh I need to create a convex hull over my objects, render an image and then delete that hull again.
My idea was to store the object, the object data or the mesh itself then create the hull and render the image and then just replace the object/data/mesh with the stored data.
For example first i´d do
self.backup[obj.name] = obj.data

and then after full &amp; rendering i´d like to do something like
orig_data= self.backup[obj.name]
obj.data = orig_data
obj.data.update()

But this is not restoring the previous data, the hull remains. I´m guessing right now I just store links instead of real data but I don´t know how to fix this because I don´t really know much about different blender data types etc.
After trying to replace the objects mesh, data and the object itself and none of it worked I sort of ran out of ideas. I´d be glad about any input =)
PS: I´m using 2.8. in case that makes any difference.
Make a copy
simple answer is `
self.backup[obj.name] = obj.data.copy()

without making a copy you had a reference to the same mesh.  If you are using bpy.ops.mesh.convex_hull suggest instead using bmesh see
Is there any way to make multiple objects convex hulls?
Convex Hull as Mesh
The data is already stored for us in the blend file data,
me = context.object.data

which without any renaming of meshes inbetween is still
bpy.data.objects[me.name]

Hence could simply keep the name, make a new mesh with another name for convex hull and swap using meshes retrieved via names.
If after creating a convex hull mesh and want to have it available permanently An approach to consider would be giving a mesh object a pointer property to the mesh of its convex hull.
bpy.props.Object.convex_hull_mesh = PointerProperty(type=bpy.types.Mesh)

create convex hull mesh and assign it to this property to save it.  Another boolean property could be used as a flag to swap between original and convex hull mesh.