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

CPR

TimB.

For those of us who don't know (including myself) when you say you're using "PS" are you referring to "Positron Studio" as in - https://www.positronstudio.co.uk/

?

If so, did you contact the author of the IDE for any solution? And if so, what was the outcome?
I've used Positron Studio a lot and I like it. I had odd crashes and the author was always very receptive and responsive.

I do find myself preferring to defer to the stock IDE a lot, possibly out of habit. As, it "just works" but lacks some nice features that "PS" provides. 

Just always "back up" anything that you consider "important" to another machine (or two) or onto external storage. It's the safest way and you'll then be OK!  :) 

TimB

Yes I am referring to positron studio.

I know John well and when asked to give feedback on issues with Positron studio. But I am sure John has probably had enough of working on the code and only does it these days to help Positron so I do not think its fair to keep sending him emails on the issues.

The code is based on another person's work and last time I spoke with John they were not offering help.

I have a Proper NAS box that are no longer working, I have off site backups that has racked up bills so I stopped that. Currently I back up to a USB hard drive but only do it once a week.  I used to have a NAS via my internet router and a USB drive but when I moved to 5G the router does not have a USB socket so that stopped its use. Now I'm investigating another router I can plug into one of my mesh nodes that has a USB socket so I can back up every night.
Its always a moving target.


CPR

#8
Quote from: TimB on Dec 27, 2025, 09:50 PMYes I am referring to positron studio.

I know John well and when asked to give feedback on issues with Positron studio. But I am sure John has probably had enough of working on the code and only does it these days to help Positron so I do not think its fair to keep sending him emails on the issues.

The code is based on another person's work and last time I spoke with John they were not offering help.

I have a Proper NAS box that are no longer working, I have off site backups that has racked up bills so I stopped that. Currently I back up to a USB hard drive but only do it once a week.  I used to have a NAS via my internet router and a USB drive but when I moved to 5G the router does not have a USB socket so that stopped its use. Now I'm investigating another router I can plug into one of my mesh nodes that has a USB socket so I can back up every night.
Its always a moving target.



All sounds a bit over complicated? Just shove the files you care about onto a spare machine? No ?