Header And Logo

PostgreSQL
| The world's most advanced open source database.

pg_backup_tar.h

Go to the documentation of this file.
00001 /*
00002  * src/bin/pg_dump/pg_backup_tar.h
00003  *
00004  * TAR Header (see "ustar interchange format" in POSIX 1003.1)
00005  *
00006  * Offset   Length   Contents
00007  *   0    100 bytes  File name ('\0' terminated, 99 maximum length)
00008  * 100      8 bytes  File mode (in octal ascii)
00009  * 108      8 bytes  User ID (in octal ascii)
00010  * 116      8 bytes  Group ID (in octal ascii)
00011  * 124     12 bytes  File size (in octal ascii)
00012  * 136     12 bytes  Modify time (Unix timestamp in octal ascii)
00013  * 148      8 bytes  Header checksum (in octal ascii)
00014  * 156      1 bytes  Type flag (see below)
00015  * 157    100 bytes  Linkname, if symlink ('\0' terminated, 99 maximum length)
00016  * 257      6 bytes  Magic ("ustar\0")
00017  * 263      2 bytes  Version ("00")
00018  * 265     32 bytes  User name ('\0' terminated, 31 maximum length)
00019  * 297     32 bytes  Group name ('\0' terminated, 31 maximum length)
00020  * 329      8 bytes  Major device ID (in octal ascii)
00021  * 337      8 bytes  Minor device ID (in octal ascii)
00022  * 345    155 bytes  File name prefix (not used in our implementation)
00023  * 500     12 bytes  Padding
00024  *
00025  * 512   (s+p)bytes  File contents, padded out to 512-byte boundary
00026  */
00027 
00028 /* The type flag defines the type of file */
00029 #define  LF_OLDNORMAL '\0'      /* Normal disk file, Unix compatible */
00030 #define  LF_NORMAL    '0'       /* Normal disk file */
00031 #define  LF_LINK      '1'       /* Link to previously dumped file */
00032 #define  LF_SYMLINK   '2'       /* Symbolic link */
00033 #define  LF_CHR       '3'       /* Character special file */
00034 #define  LF_BLK       '4'       /* Block special file */
00035 #define  LF_DIR       '5'       /* Directory */
00036 #define  LF_FIFO      '6'       /* FIFO special file */
00037 #define  LF_CONTIG    '7'       /* Contiguous file */