How to back up the memory content from the arduino

Oke, I am not sure if this it’s the right place to post this. But I hope I van get some guidance.
I been working in a project where I have few arduinos talking to each other and using the Ethernet shields, So far everything has been running quite perfectly. but recently. But my Hard drive just died the other day, loosing every single bit of code that it’s running in the arduinos.

I need to modify the value of one variable in the code of one of my arduinos, but since I lost the original code, this task it’s impossible with out rewrite the entire source code again.

Now here is the big question; is it possible to read the code that is running in a Arduino board, so I can avoid to rewrite every single line of code.

Thank You in advance

The sad answer is no.

As far as i remember you can get the binary out of the processor, but there is no way to rool it back to the C code you originally wrote.

The code has already been compiled, hence it is now machine code, so even if you did read back the binary, it wouldnt make much sense.

You can try using a disassembler/decompiler. I’ve never used one but I haven’t ever heard good things so ymmv.

The C code is not stored on the Arduino, just the machine code.

A better direction might be trying to retreive the data from the hard drive. How did your hard drive die? There’s various things you can do to try and retreive the data on it. Even putting it in the freezer for a little while can get a dead drive going long enough to recover the data onto a good drive.

I need to modify the value of one variable in the code of one of my arduinos

What’s the type of the variable? What was the original value? What is the new value?

Depending on the answer to such questions you might be able to pull the binary data off the chip and write it back.