You can even use M374 to save the current heightmap.csv as another file.

https://duet3d.dozuki.com/Wiki/Gcode#Section_M374_Save_height_map