Consultor Eletrônico



Kbase P142915: What information would I need to put into /etc/magic to get my aix "file" command to recognize a pro
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/16/2009
Status: Unverified

GOAL:

What information would I need to put into /etc/magic to get my aix "file" command to recognize a progress probkup?

GOAL:

What should I put in my aix etc/magic file?

FACT(s) (Environment):

IBM AIX
Progress/OpenEdge Product Family

FIX:

Progress does put in a magic number in the backup header. It is at offset
616 (give or take a byte or two). It is imple to construct a magic file definition for the backup file.
The first 264 bytes of the header contain 3 80 bytes long lines of text which is designed to be displayed with the "head" command. The first line contains something like
volume 1 of backup taken Sat Mar 14 08:31:18 2009 for OPENEDGE database:
The next line has the database name. The third has a line of information about incrementals (if I remember correctly). After that there are a bunch of binary fields with potentially useful information, including the magic number. Here's some of what the 10.1A header has in it
offset length contents
0 264 3 lines of text followed by null bytes
264 4 long backup date
276 4 long 0 if full backup else incremental number
300 4 long volume size
304 4 long blocking factor
313 301 text database path name
614 1 byte 1 of line backup, 2 if offline
616 4 long magic number 0x07070707
There's other stuff in the header, defined in backup.h in the rocker dbadmin/incl directory.
So a magic definition could be something like this
616 long 0x07070707 OpenEdge database backup
313 string for database %s
276 long 0 Full backup
276 long !0 Incremental %d