Author Topic: How do I get back my recipes?  (Read 15199 times)

Offline wahoo

  • BeerSmith Brewer
  • ***
  • Posts: 28
How do I get back my recipes?
« on: September 21, 2011, 07:46:55 PM »
I am using BeerSmith2 on a network with 2 computers.  The program and data reside on one computer, in a shared folder, and the 2nd computer accesses it with a shortcut to the EXE file.  This has been working since BeerSmith2 was released with no problems.

Yesterday, I logged in the primary computer, and most of my data is gone.  I keep my recipes in a series of folders and one was totally gone, while the others had old versions of the data.

I looked in the data directory and while Recipes.bsmx was approx 2MB, as were Recipes2, and Recipes3, Recipes4.bsmx was twice that size.  I opened this file directly by double clicking on it and sure enough the data (at least the Recipes) were there.

Please advise on how to carefully reinstate my data.  The good news is I have ample backups of this stuff, if I need to retrieve an old version of the file. 

Offline BeerSmith

  • Brewer, Author, Patriot
  • BeerSmith Administrator
  • BeerSmith Grandmaster Brewer
  • *****
  • Posts: 5561
  • BeerSmith - take the guesswork out of brewing!
    • BeerSmith
Re: How do I get back my recipes?
« Reply #1 on: September 22, 2011, 03:13:33 PM »
Hi,
 I'm not sure how this could happen unless something was badly corrupted or you moved/renamed your Documents/BeerSmith2 directory.  The only other possibility would be a change of user permissions/user login or directories that prevented the program from accessing your current Documents/BeerSmith2 directory.

  All of your data is stored in the Documents/BeerSmith2 directory.  Unless you do a "Change Documents Directory" (on the file menu) or move/rename that directory the data will stay in that directory - there is nothing in the program to change it.

  The "worst case" recovery process for a corrupt/missing file in BeerSmith 2 is as follows:
  - Rename your "Documents/BeerSmith2" directory to something else like "OldBeerSmith" - so you don't lose anything
  - Restart BeerSmith2 - which will create a new BeerSmith2 directory with the sample recipes in it
  - You will likely have to enter your registration key again
  - Once you have BeerSmith running again, use the Open command to open your old Recipe.bsmx file
    that is now in your "OldBeerSmith" directory  and then copy/paste any recipes you need into
    your new "My Recipes" folder
  - You can do the same with Equipment.bsmx, Hops.bsmx, etc... if you have added items beyond
    those that came with BeerSmith 2
  - If you can't open one of the files (Recipe.bsmx for example), you can also try opening the numbered
    backups (Recipe1.bsmx, Recipe2.bsmx, etc...) - these contain older copies of the original.
  - Let me know if you have any problems - and please keep your "OldBeerSmith" directory around
     (the one you renamed earlier) as it will have all of your data in it!

Cheers,
Brad


Get a free trial of BeerSmith 3 here

Offline wahoo

  • BeerSmith Brewer
  • ***
  • Posts: 28
Re: How do I get back my recipes?
« Reply #2 on: September 22, 2011, 08:43:52 PM »
I'll try that.  A couple pieces of info to help with future troubleshooting:
- Running the main machine on WinXP, the 2nd machine Win7
-While the "main" machine hosts the Beersmith2 folder, i primarily access from the 2nd machine
-My data directory was C:\Program Files\BeerSmith2\JS-Data
-This has worked fine for months and then mysteriously one day, my Recipes/Brews folder was gone.  This is where I do most of my work-- it holds my "actual" brews. 

I'm not worried about permanently losing this data because I have nightly backups, but still-- don't want this to happen again!

Offline wahoo

  • BeerSmith Brewer
  • ***
  • Posts: 28
Re: How do I get back my recipes?
« Reply #3 on: September 23, 2011, 07:44:00 AM »
That seems to have worked, thanks Brad.  I'll let you know if it happens again.  I did a diff on all my files and only Recipes.bsmx had changed. 

Offline BeerSmith

  • Brewer, Author, Patriot
  • BeerSmith Administrator
  • BeerSmith Grandmaster Brewer
  • *****
  • Posts: 5561
  • BeerSmith - take the guesswork out of brewing!
    • BeerSmith
Re: How do I get back my recipes?
« Reply #4 on: September 23, 2011, 11:32:34 AM »
Thanks,
  I'm going to take a close look at the error recovery code for reading files as well.  I'm concerned that it might be resetting the entire system when it can't read a single corrupt file.  It should be able to recover from single file errors, but I need to run some test cases and verify that.

Brad
Get a free trial of BeerSmith 3 here

Offline jfreise

  • BeerSmith New Brewer
  • *
  • Posts: 2
Re: How do I get back my recipes?
« Reply #5 on: October 05, 2011, 07:53:51 PM »
Hi,
I have had the exact same thing happen to me twice. I have a mapped network drive. I access the recipes from a desktop machine (Windows 7 Pro 64-bit) and a laptop (Windows XP). I brewed using my laptop on Saturday, opened up BeerSmith2 on my desktop tonight and all the recipes were gone (the default sample ones were there). I verified the Change Documents Directory was still set to the network drive. I do not have a backup system, so I seem to have lost all my data from the batch I brewed on Saturday. Any suggestion on how to prevent this from happening?

I should also note that when I leave BS2 open for a while I get two errors about can't write data and one saying the disk is full. I usually click on my network drive (as if to reconnect) and then BS2 can get to the files again. This might have something to do with this issue.

Thanks,
Jay
« Last Edit: October 05, 2011, 07:56:11 PM by jfreise »

Offline BeerSmith

  • Brewer, Author, Patriot
  • BeerSmith Administrator
  • BeerSmith Grandmaster Brewer
  • *****
  • Posts: 5561
  • BeerSmith - take the guesswork out of brewing!
    • BeerSmith
Re: How do I get back my recipes?
« Reply #6 on: October 05, 2011, 08:27:40 PM »
Hi,
  The backups are stored automatically for each day in Recipe1.bsmx, Recipe2.bsmx, etc... for your Documents/BeerSmith directory so you may be able to recover from there (other data is also in numbered backups such as Hops1.bsmx...)

  I see two potential problems with working from a network drive:
   1) As you point out above if the network drive is disconnected obviously BeerSmith won't be able to autosave your data to it (which is done when its idle)
   2) There is no "interlock" mechanism to prevent two copies running on your two machines from overwriting each other - which is the most likely cause of the data loss.

  If you work from a network drive it needs to be connected all the time, and most importantly you need to make sure you only have one copy of BeerSmith open at a time.  Opening two instances of BeerSmith from two different machines where they are sharing one drive is a recipe for disaster.

Brad
Get a free trial of BeerSmith 3 here

Offline wahoo

  • BeerSmith Brewer
  • ***
  • Posts: 28
Re: How do I get back my recipes?
« Reply #7 on: October 05, 2011, 08:44:05 PM »
Note: in my instance I've never run the two copies simultaneously.  For the most part, I always run the s/w on the "remote" machine.

Offline jfreise

  • BeerSmith New Brewer
  • *
  • Posts: 2
Re: How do I get back my recipes?
« Reply #8 on: October 07, 2011, 07:36:51 AM »
I never run from two machines at the same time either. If I can figure out the steps to re-create the data reset issue, I'll let post it. Thanks for the tips!

Offline wahoo

  • BeerSmith Brewer
  • ***
  • Posts: 28
Re: How do I get back my recipes?
« Reply #9 on: October 10, 2011, 06:05:54 AM »
Brad,
What happens if scenario 1 occurs, where, if the network drive is disconnected, BeerSmith won't be able to autosave your data to it?

I would think that this would just cause a loss of any updates, with some sort of error message.  But, the issue we're seeing here is that I'm losing historical data, and in one case, style data that I've never edited (see http://www.beersmith.com/forum/index.php/topic,5888.0.html )

Is it possible that if the network drive gets disconnected, and then later reconnected (for instance, if the server reboots) while beersmith is still running, it could potentially cause this type of data corruption? 

As I said in the other thread, I used this same arrangement on beersmith 1.4 and it worked flawlessly.




Offline wahoo

  • BeerSmith Brewer
  • ***
  • Posts: 28
Re: How do I get back my recipes?
« Reply #10 on: October 14, 2011, 05:55:55 AM »
bump

Offline BeerSmith

  • Brewer, Author, Patriot
  • BeerSmith Administrator
  • BeerSmith Grandmaster Brewer
  • *****
  • Posts: 5561
  • BeerSmith - take the guesswork out of brewing!
    • BeerSmith
Re: How do I get back my recipes?
« Reply #11 on: October 14, 2011, 10:33:34 AM »
Hi,
  The difference may be that BeerSmith2 saves all of the data on closing, not just items that may have changed.  One scenario might be that the file is opened for writing, then the network drive drops out and it never flushes the data out and completes the write?

  Is the "bad file" completely empty?  If so I might be able to write some code that detects some obvious errors (empty file for instance) and reverts to the last good copy.

Brad
Get a free trial of BeerSmith 3 here

Offline wahoo

  • BeerSmith Brewer
  • ***
  • Posts: 28
Re: How do I get back my recipes?
« Reply #12 on: October 19, 2011, 09:54:31 AM »
No, it appears to be a subset of the complete file.

I am also the user that had a portion of his styles disappear.
http://www.beersmith.com/forum/index.php/topic,5888.msg23682.html

Offline codejnki

  • BeerSmith Apprentice Brewer
  • **
  • Posts: 6
  • This space intentionally left blank.
    • North American Slacker
Re: How do I get back my recipes?
« Reply #13 on: October 23, 2011, 01:06:32 PM »
I had a similar situation happen where I lost all of the work I had done.

I attempted to print a report but my printer happened to be disconnected at the moment. The program crashed,  and when I reopened it all of the ingredients and recipes I had been working on were gone.


Offline wahoo

  • BeerSmith Brewer
  • ***
  • Posts: 28
Re: How do I get back my recipes?
« Reply #14 on: November 04, 2011, 05:57:52 AM »
It happened again  :o

Over the weekend, I was using Beersmith2 on my laptop (which runs Win 7 and is on a wireless network).  I recieved the following errors:

7:22:07 AM: Write error on file '\\D9200\BeerSmith2\JS-Data/T-6399Recipe.bsmx' (error 64: the specified network name is no longer available.)
7:22:07 AM: Write error on file '\\D9200\BeerSmith2\JS-Data/T-6399Recipe.bsmx' (error 64: the specified network name is no longer available.)
7:22:07 AM: Write error on file '\\D9200\BeerSmith2\JS-Data/T-6399Recipe.bsmx' (error 64: the specified network name is no longer available.)
7:22:07 AM: failed to flush the file '\\D9200\BeerSmith2\JS-Data/T-6399Recipe.bsmx' (error 64: the specified network name is no longer available.)

The first error appeared dozens and dozens of times.  The last one only appeared once.

I reopened beersmith on this machine and used it thoroughly and everything appeared to be fine.

However, then a few days later, I opened beersmith on the hosting machine (a win XP desktop which is connected to the same network via ethernet), and saw all my recipes were gone other than ones from 2006 and 2005! 

I run Beersmith.exe from \\D9200\BeerSmith2\BeerSmith2.exe
my data directory is \\D9200\BeerSmith2\JS-Data

I am going to continue to monitor this and see if I can identify a pattern.  Any information you might have about the error above would help.




 

modification