Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help Recovering Deleted Btrieve Records

Status
Not open for further replies.

abullen

Programmer
Mar 10, 2012
2
0
0
HK
thread321-848712

I was wondering if the program mentioned above worked
 
No. BUTIL will not recover deleted records. As I stated in that thread, I know of no methods of recovering deleted records.
The way Btrieve / PSQL works is that once a record is deleted, the record entry on the PAT (Page Allocation Table) page is marked as "free space." The next record to be inserted could use that space (or not).
Recovering any records would be a long and difficult process. You would have to know exactly where in the file the record is, where in the PAT page the record is marked as free, and possibly some other non-documented information. In my 17 years of using Btrieve, I've never seen a tool that can recover deleted records.

Your best option is to go back to your backup.

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Thanks Mirtheil - unfortunately there is no backup as it happened during the day and is only a subset of the records. I am happy to have my team code something or pay for something to be coded by someone else. We do have a copy of the file before new data was input.
 
I don't think coding a solution is an option. Some of the information needed has never been published by Pervasive. Specifically, some of the page structures and other information needed to "unmark" a deleted record.
There was a tool called Datasave from Jim Kyle but it was designed for corrupted files and I believe it only works with v6 format Btrieve files.

If you really have no backup, you'll need to recreate the deleted records.

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
It's even worse than Mirtheil said: when Btrieve deletes a record, it completely zeroes out all the bytes of the record so that even if you knew the exact disk address, you would find no data there. It's been this way since Version 1.0 way back when, and was done deliberately as a security measure.

The only solution is to have good backups, and make a special backup copy before doing anything the slightest bit risky.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top