[SOLVED] Recover earlier version of file on SSD?

Countess_C

Reputable
Aug 24, 2019
221
38
4,640
Let's say that I open an image or text file on an SSD and do some edits and save it, and then I realise I made a mistake, is it possible to retrieve the old version with a recovery tool? If the wear leveling writes the data of the new save on another place on the SSD instead of overwriting the old data, then the old version of the file should still be there, right?

I'm just curious. I try to remember to make a duplicate of an important file before making changes, to be safe.
 
Solution
Oh, I thought the wear leveling saved the file in a new place and just left the old data in place but as "available" space on the disk. Interesting. Thanks. :)
No, it doesn't do that on a "file" level.
mypic.jpg is hundreds/thousands of bytes.

Wear leveling happens on an individual cell level. Your jpg may be spread across hundreds of thousands of cells, at the bit level. 8 bits = 1 bytes.
A cell may be 2 or 3 bits.

Lutfij

Titan
Moderator
It should but as is the case for pretty much everyone on the planet your mileage can and will vary. You might even come up with a half baked image. I've had it happen to me in the past when using Recuva to retrieve files I deleted by mistake. Now I just make sure I safe in different versions hence why you see the dot used very liberally! Filename v1.1.1.1.1.1.1.9, well you get the point with the version nomenclature.
 
  • Like
Reactions: Countess_C

Countess_C

Reputable
Aug 24, 2019
221
38
4,640
It should but as is the case for pretty much everyone on the planet your mileage can and will vary. You might even come up with a half baked image. I've had it happen to me in the past when using Recuva to retrieve files I deleted by mistake. Now I just make sure I safe in different versions hence why you see the dot used very liberally! Filename v1.1.1.1.1.1.1.9, well you get the point with the version nomenclature.
Yeah, I guess sometimes parts of the data could have been overwritten and retrieved images turn out half green or whatever. :)
 

USAFRet

Titan
Moderator
Let's say that I open an image or text file on an SSD and do some edits and save it, and then I realise I made a mistake, is it possible to retrieve the old version with a recovery tool? If the wear leveling writes the data of the new save on another place on the SSD instead of overwriting the old data, then the old version of the file should still be there, right?

I'm just curious. I try to remember to make a duplicate of an important file before making changes, to be safe.
No.
The file will have been overwritten when you saved.
TRIM/wear leveling has nothing to do with it.

You would need to save it as a different file.

My backup routine is an Incremental every night.
So I can go back to 'yesterday', or 'last tuesday'. I can't go back to '30 minutes ago'.
 

Countess_C

Reputable
Aug 24, 2019
221
38
4,640
No.
The file will have been overwritten when you saved.
TRIM/wear leveling has nothing to do with it.

You would need to save it as a different file.

My backup routine is an Incremental every night.
So I can go back to 'yesterday', or 'last tuesday'. I can't go back to '30 minutes ago'.
Oh, I thought the wear leveling saved the file in a new place and just left the old data in place but as "available" space on the disk. Interesting. Thanks. :)
 

USAFRet

Titan
Moderator
Oh, I thought the wear leveling saved the file in a new place and just left the old data in place but as "available" space on the disk. Interesting. Thanks. :)
No, it doesn't do that on a "file" level.
mypic.jpg is hundreds/thousands of bytes.

Wear leveling happens on an individual cell level. Your jpg may be spread across hundreds of thousands of cells, at the bit level. 8 bits = 1 bytes.
A cell may be 2 or 3 bits.
 
Solution

Countess_C

Reputable
Aug 24, 2019
221
38
4,640
No, it doesn't do that on a "file" level.
mypic.jpg is hundreds/thousands of bytes.

Wear leveling happens on an individual cell level. Your jpg may be spread across hundreds of thousands of cells, at the bit level. 8 bits = 1 bytes.
A cell may be 2 or 3 bits.
Oh, so saving the edited pic writes the data to new cells that could be anywhere on the SSD? What happens to the data from the older save, then? Will the data just be too spread out for a recovering program to retrieve it?
 

USAFRet

Titan
Moderator
Oh, so saving the edited pic writes the data to new cells that could be anywhere on the SSD? What happens to the data from the older save, then? Will the data just be too spread out for a recovering program to retrieve it?
Yes, it gets written to new cells.
The previously used cells may or may not be zeroed out after <some random time>, determined by the drive firmware.

There is no consumer level way to access what used to be mypig.jpg v1.
By some weirdness you might be able to extract a bit or two.
But that is like digging up half a fingernail and a few stomach lining cells. Not a person.jpg anymore.

If you think you need to be able to access mypic_v1.jpg, then save your edits as mypic_v2.jpg .
Then, you have both files. Delete old or new as desired.


When I'm building a new CAD model for my 3D printer, that is exactly what I do.
A model may go through a dozen iterations.

Maybe at v5, the previous 1-4 get deleted.
Then v5 becomes the baseline, eventually up to v10 or whatever.

Or, use software that has multiple Undo levels.
But even then...once you save, all those undo levels are gone.


Or, use some version control software package.
But that is probably over the top for what you're looking to do.
 
  • Like
Reactions: Countess_C

Countess_C

Reputable
Aug 24, 2019
221
38
4,640
Yes, it gets written to new cells.
The previously used cells may or may not be zeroed out after <some random time>, determined by the drive firmware.

There is no consumer level way to access what used to be mypig.jpg v1.
By some weirdness you might be able to extract a bit or two.
But that is like digging up half a fingernail and a few stomach lining cells. Not a person.jpg anymore.

If you think you need to be able to access mypic_v1.jpg, then save your edits as mypic_v2.jpg .
Then, you have both files. Delete old or new as desired.


When I'm building a new CAD model for my 3D printer, that is exactly what I do.
A model may go through a dozen iterations.

Maybe at v5, the previous 1-4 get deleted.
Then v5 becomes the baseline, eventually up to v10 or whatever.

Or, use software that has multiple Undo levels.
But even then...once you save, all those undo levels are gone.


Or, use some version control software package.
But that is probably over the top for what you're looking to do.
Thanks again. :)

I've been doing that for about six months now, saving the edits as new files, and then after a while deleting the no longer needed versions. Maybe keeping the original (depending on what it is). I also do backups, both on a storage HDD in my PC and on an external HDD.
 
  • Like
Reactions: USAFRet