Copies the file system onto temporary storage media.
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.
The different types of header records for by-name backups are:
The different types of header records for by-inode and name backups are:
The descriptions of the fields of the header structure for by-inode backups are:
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.
The format of a by-name backup is:
FS_VOLUME
FS_NAME_X (before each file)
File Data
FS_END
The format of a 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 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 v3 */ #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 */
The backup command, pack command, restore command.
The filesystems file.
File Systems Overview and Backup Overview in AIX 5L Version 5.2 System Management Concepts: Operating System and Devices.