Author Topic: Any way to recover data after crash?  (Read 2941 times)

Offline joelshort

  • PixInsight Addict
  • ***
  • Posts: 260
    • Buckeyestargazer.net
Any way to recover data after crash?
« on: 2016 March 28 16:47:49 »
Is there any way to recover data after PI crashes?  I was working on a mosaic image and had previously saved the project about 1/3 of the way done.  After spent considerable time processing, but before I saved the project again, PI crashed and windows force closed.  I don't like the idea of having to redo mosaic data again.
 
Joel Short
www.buckeyestargazer.net
CFF135 f6.7, SV80ST, G3-16200M, QHY163M, QHY183M

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Any way to recover data after crash?
« Reply #1 on: 2016 March 28 21:13:07 »
it is not easy to recover everything, but you can do the following:

1) the auto-saved .psm file should be in the same directory where your swap files are. on macosx this is in /tmp by default. i am not sure about windows. if you copy that PSM file out of that directory you can then load it the way you would load any other xpsm file. therefore you can get all your process icons back, assuming you had PSM auto-save turned on.

2) you can recover a particular step in the history of some image. in theory it's possible to recover the whole "visual" history of an image, but the actual history is lost. the problem is that you have to somehow guess at which .swp file is relevant to you, say by looking at the timestamps in the /tmp directory. anyway the trick is to create a dummy image with pixelmath or by opening another image, then apply some operation to it, like invert. a new .swp file will then be created which holds the original state of that dummy file. the next trick is to copy over that .swp file with the .swp file that you're interested in, and then undo the invert. that will cause PI to load the .swp file again, but instead of loading the pre-invert state, it ends up loading the .swp image you copied. so then you can save your file out in some other format.

you could apply multiple bogus operations to your dummy file and then copy all the .swp files belonging to some image that you were working on, but the problem is figuring out which .swp files on disk belongs to a particular image's history. lots of trial and error, and not too fun.

after a crash, i usually copy all the .swp files out of the /tmp directory just to be safe. in the OSX terminal you can force copied files to retain their original creation date; not sure what happens on windows when you copy a file in the file explorer.

since you were working on a mosaic, you could probably use the sizes of the .swp files to determine which ones are part of the mosaic... all the largest ones are probably the ones you are interested in.

rob

edit: i was just looking at swap files that were created, and they do seem to have part of the image name in them, so identifying which swap file is which is perhaps not as hard as i remembered. for me anyway it's been a very long time since PI has crashed on me so i've forgotten the details.
« Last Edit: 2016 March 28 21:20:56 by pfile »

Offline joelshort

  • PixInsight Addict
  • ***
  • Posts: 260
    • Buckeyestargazer.net
Re: Any way to recover data after crash?
« Reply #2 on: 2016 March 29 06:02:48 »
Thanks Rob.  It looks like several of the key temp swp files are missing.  They do indeed have identifying names but I can't find the ones I need.  The wierd thing is that there are swp temp files going back several images ago for images that I processed weeks ago but not the most recent ones I need. 

I do have all the master raw mosaics saved as xisf files so I'll just have to redo my work starting from the creation of the channel mosaics. 

Thanks again.
Joel Short
www.buckeyestargazer.net
CFF135 f6.7, SV80ST, G3-16200M, QHY163M, QHY183M