[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4 Files Reference

backup File

Purpose

Copies the file system onto temporary storage media.

Description

A backup of the file system provides protection against substantial data loss due to accidents or error. The backup command writes file system backups in the backup file format, and conversely, the restore command reads file system backups. The backup file contains several different types of header records along with the data in each file that is backed up.

Header Records

The different types of header records for the Version 3 by-name backups are:

FS_VOLUME Exists on every volume and holds the volume label.
FS_NAME_X Holds a description of a file backed up by name.
FS_END Indicates the end of the backup. This header appears at the end of the last volume.

The different types of header records for the Version 3 by-inode and name backups are:

TS_TAPE Exists on every volume and holds the volume label.
TS_BITS Describes the directory structure.
TS_CLRI Describes the unused i-node numbers on the backup system.
TS_INODE Describes the file.
TS_ADDR Indicates a continuation of the preceding file.
TS_END Indicates the end of the backup.

The descriptions of the fields of the header structure for by-inode backups are:

c_type The header type.
c_date The current dump date.
c_ddate The file system dump date.
c_volume The volume number.
c_tapea The number of the current header record.
c_inumber The i-node number on this record.
c_magic The magic number.
c_checksum The value that would make the record sum to the CHECKSUM value.
bsd_c_dinode A copy of the BSD i-node as it appears on the BSD file system.
c_count The number of characters in the c_addr field.
c_addr A character array that describes the blocks being dumped for the file.
xix_flag Set to the XIX_MAGIC value if doing the backup of a Version 3 file system.
xix_dinode The real di-node from the Version 3 file system.

Each volume except the last ends with a tape mark (read as an end of file). The last volume ends with a TS_END record and then the tape mark.

For more information on Version 2 by-name and by-inode header formats please consult your Version 2 documentation.

By-Name Format

The format of a Version 3 by-name backup is:

FS_VOLUME

FS_NAME_X    (before each file)

File Data

FS_END

The Version 3 header formats for by-name backups are not the same as the Version 2 header formats.

By-Inode Format

The format of a Version 3 by-inode backup follows:

TS_VOLUME

TS_BITS

TS_CLRI

TS_INODE

TS_END

A detailed description of the by-inode header file follows:

union u_spcl {
    char dummy[TP_BSIZE];
    struct s_spcl {
        int       c_type;                         /* 4 */
        time_t    c_date;                         /* 8 * /
        time_t    c_ddate;                        /* 12 */
        int       c_volume;                       /* 16 */
        daddr_t   c_tapea;                        /* 20 */
        ino_t     c_inumber;                      /* 24 */
        int       c_magic;                        /* 28 */
        int       c_checksum;                     /* 32 */
        struct    bsd_dinode   bsd_c_dinode;      /* 160 */
        int       c_count;                        /* 164 */
        char      c_addr[TP_NINDIR];              /* 676 */
        int       xix_flag;                       /* 680 */
        struct    dinode       xix_dinode;        /* 800 */
    } s_spcl;
} u_spcl;

Constants

Constants used to distinguish these different types of headers and define other variables are:

#define OSF_MAGIC    (int)60011
#define NFS_MAGIC    (int)60012    /* New File System Magic    */
#define XIX_MAGIC    (int)60013    /* Magic number for AIXv3   */
#define BYNAME_MAGIC (int)60011    /* 2.x magic number         */
#define PACKED_MAGIC (int)60012    /* 2.x magic number for     */
                                   /* Huffman packed format    */
#define CHECKSUM     (int)84446    /* checksum magic number    */
#define TP_BSIZE     1024          /* tape block size          */
#define TP_NINDIR    (TP_BSIZE/2)  /* num of indirect pointers */
                                   /* in an inode record       */
#define FS_VOLUME    0             /* denotes a volume header  */
#define FS_END       7             /* denotes an end of backup */
#define FS_NAME_X    10            /* denotes file header      */
#define SIZSTR       16            /* string size in vol header*/
#define DUMNAME      4             /* dummy name length for    */
                                   /* FS_NAME_X                */
#define FXLEN        80            /* length of file index     */

Implementation Specifics

This file is part of Base Operating System (BOS) Runtime.

Related Information

The backup command, pack command, restore command.

The filesystems file.

File Systems Overview and Backup Overview in AIX Version 4.3 System Management Guide: Operating System and Devices.


[ Previous | Next | Contents | Glossary | Home | Search ]