News:

Let's find out together what makes a PIC Tick!

Main Menu

Issue restoring an archive

Started by TimB, Dec 26, 2025, 10:57 AM

Previous topic - Next topic

TimB

I had an issue with PS in that it refused to open, it just produced an error message.
So uninstalled it and reinstalled, opened ok and carried on

I need to make a big branch with my code so I could write a master to test coms. Saved as and shut the original. Then started deleting the not wanted code sections. Stopping periodically to save as I went.

I then looked in the Proc tree to see what I had left to look over and clicked on a Proc. The issue was the proc had been deleted so just thought it had not updated its self.

Went back to deleting procs and saved. Then I realised when it looked for the proc and clicked on it. PS had reopened the orginal and so when I started deleting again it was deleting the original files content. OH SHIT!!!!!!!!!!!!

Ok restore restore back to an orginal using the restore function. As I had never compiled the new file there was no restore files. So opened the original file that did have restore archives. But nothing shows up. They are there as I can see them using file explorer. But they will only open using PS and its not seeing them

I'm now VERY worried that I have lost weeks of code since my last PC back up

HELP how do I force PS to open the back ups?

Tim

trastikata

Hello TimB, any source code file can be opened with any text editor, like Notepad. If Notepad doesn't show anything, then either there's nothing or the file might have been corrupted.

But with a modern freeware or trial file recovery software you might be able to recover portion or even all of the code because there's a good chance the actual 1s and 0s from the file might not have been overwritten.

TimB

An update

I changed the .bak to .zip on the archive file and found it just contained a txt file with the compile date. Not sure where the real data is.

But PS keeps a Restore folder and as PS crashes a lot it saved a copy of the affected file a few days back. I made a copy and opened that. It looks to be ok. A compare diff of the 2 files shows just a few differences made before I noticed it was the wrong file. Mostly uncommenting, so it looks like I was able to recover the file but not the way I was expecting.

I do like PS but thinking now perhaps I need to move to VS as I cannot risk PS losing a file again.

John Lawton

Hi Tim,

it's a nightmare losing valuable code, so why not use a daily snapshot backup of your data, then you shouldn't ever lose that much again.

John

atomix

There are local copies of files in VSCode, it is very convenient to view the changes and restore the files.

https://code.visualstudio.com/docs/getstarted/userinterface#_timeline-view

CPR

Quote from: TimB on Dec 26, 2025, 11:23 AMHELP how do I force PS to open the back ups?

Tim

It's simple really. Just *always* back up any important files onto a separate drive/another machine... as this can happen to anything... I guess you're learning that lesson now? You can ask me how I know?  ;D