I am truly sorry that for whatever reason you may have lost several hours of work.
Many of us have learned this EXTREMELY painful lesson the hard way. Backups are a critical part of success as a recording engineer.
I hope this is the first and the last time you face this situation, and that you for the rest of time save after each important segment of a given project is achieved, whether that is a killer guitar solo from a visiting legend, a once in a lifetime capture of a live performance, or that perfect new sound you spent hours working up. And, I hope that you have or now accept that even this is only PART of the process, in that even your local copy of data is not secure, and that you additionally back things up externally, and further consider periodic offsite storage of system image and full data backups.
I also have a tendency to make a temporary backup of any project I am about to work on - the whole project folder, immediately prior to beginning work for any particular session. Such a backup is a matter of a couple of minutes at most to accomplish, and protects against catastrophic corruption of the entire project. This is in addition to saving the project after each and every significant task during any session is accomplished, like after any 'keeper' live-played clips or significant edits.
The earlier posted advice is stated about as eloquently as I have ever seen, about saving or backing up - "Whenever you've done something you don't want to lose."
I was the database administrator for a major mid-western university for a number of years, and one day some construction Einsteins managed to cut through the main power grid feed for literally a quarter of the downtown section of the city. LITERALLY in the blink of an eye, we lost power to not only the mainframe, but also to the emergency backup generators on the roof. The temperature got so hot so quick that some of the solder on the circuit boards of the mainframe melted.
No problem - get the replacement parts and use the built-in processes we had to recover everything except in-flight data - only small bits of data that were in between hitting the save button and the saved data being written to both the database and to separate physical tape as a backup.
Well, this was our lucky day. the backup media was bad, so we went to our backup plan to that plan, which was called forward recovery, where you restore the database to its state from the beginning of that day, and reapply all logged transactions that had been written to yet another separate physical tape. Well, THAT tape was bad.
It was ONLY because we also had an additional disk log file that was a backup to the backup which was itself a backup to the main backup that we were able to reconstruct almost all of the 'lost' data.
We would have faced legal consequences had we not had those levels of backups in place, and procedures defined and thoroughly tested to recover from exactly that kind of situation. (we actually had 3 more levels of backups on top of the 3 above levels - daily incremental backups of the entire database kept offsite, an additional set of weekly full system-wide backups kept offsite at yet a different physical location, where the delivery drivers contractually took different driving routes each week, and a last resort offsite set of monthly full system-wide backups done in the same manner to yet another physical location.
Now, the above is overkill for our purposes of recording sessions, but the point is that you either put in place a set of backups that contain enough levels to meet realistic needs, or you WILL at some point lose some amount of critical data.
For MY backup plan for my recording data I:
1. Backup any existing project folder I am about to work on, immediately prior to starting to work on it.
2. During a session in Sonar for the given project, anytime I complete some recording or editing task - at the clip level, or as makes sense for whatever task I have just completed, I hit CTRL+S to save that work.
3. If for a given session for the project I have done enough complex or significant things to make me nervous, I will take a few minutes and close the project and again save a copy of the entire project folder, or if I had only been working with midi data I will save off the project file and not the audio folder (because it was already backup up prior to the session and nothing had changed in it).
4. After finishing the session for the day, I take another full backup of the project folder, which is saved to a different physical drive than the one the project lives on.
I have additional processes in place for nightly, weekly, and monthly backups.
I will nearly certainly NEVER lose more than a tiny section of a single session - literally my general exposure is only to potentially lose a single edit task for a single clip. I expect to NEVER lose an entire project, unless my computer, my car, and the cloud are all destroyed, in which case I think I would have more to worry about than a Sonar project.
I keep a DVD OS image and an external drive with a monthly full data backup of my entire system - including sample libraries and all data files - in my car, and nightly I backup currently worked on project folders to the cloud - and this is in addition to the external drive attached to the system and the local copies on the hard drive.
It takes discipline and commitment to set up and follow backup procedures, but the PITA of developing and following those pales in comparison to the pain of potentially losing something irreplaceable from NOT having set up and followed backup/recovery procedures.
Bob Bone