On Oct 22, 2017, at 2:00 PM, Arnaud de Montard wrote: > Unbelievable but a customer of mine has always thought that any backup > solution was really too expensive. Predictable has occurred, crash, no > backup, only a damaged data. I think I'll never understand how people can > have such a disregard for their own work (10 years of input, 4 users C/S). > Hopefully the cost of repair will make him change his mind… > > The damaged data can be opened, but MSC says it must be repaired. After > repairing "standard" and verification, MSC says "it's OK" but it's not, very > strange things happen. > > The solution to get a workable 4dd is to export all/import all, I think, but > my experience of such a situation is near to zero. > > I tried SQL EXPORT SELECTON to detect what tables have unreadable records in > the damaged data, 2 tables (the biggest, of course). > > • 1st question, where do I export from? The damaged data, or the repaired by > MSC one?
You can try both, but you should have better results from the repaired one. Try doing MSC standard repair more than one time. Repair and then repair the repaired data file. That will sometimes fix super damaged data files. Also, if you can’t get a good data file with the advanced “recover by tag” way in MSC you really do have big problems. That should fix even the most damaged of data files by just skipping over bad records that it encounters. > • 2nd question, how to export? A loop through table with SEND RECORD, or SQL > EXPORT SELECTION? > (given that I think I'm able to detect damaged records and ignore them in the > exported selections) I would use SEND RECORD. Particularly if there are BLOB, picture or object fields in the record. You can bang out the code in just a few hours. You know exactly how to do it. Just a few nested for loops with SEND RECORD, NEXT RECORD on the inside. You may have to write the export method and run it a few times and see where it dies. Keep track of the record number or the loop counter you use when processing the records in the table. Then you patch the export method to jump over the records that cause export problems in each export run. Run the export again and repeat if necessary excluding more damaged records you find. Good luck on recovering the data. I’ve been there myself and I know it is no fun. Just keep telling yourself “the client is paying me for every hour I’m working on this and this whole mess is all his fault anyway.” Without you efforts now he would have zero data recovered. Most people will buy a fire extinguisher after their house burns down. Hopefully, your client will be one of those type people and get on an offsite backup plan after they pay the bill to fix this mess. Tim ******************************************** Tim Nevels Innovative Solutions 785-749-3444 [email protected] ******************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

