UFSDUMP(5) | File Formats and Configurations | UFSDUMP(5) |
ufsdump, dumpdates - incremental dump format
#include <protocols/dumprestore.h>
/etc/dumpdates
Tapes used by ufsdump(8) and ufsrestore(8) contain:
The format of the header record and the format of the first record of each description in the <protocols/dumprestore.h> include file are:
#define TP_BSIZE_MAX 65536 #define TP_BSIZE_MIN 1024 #define ESIZE_SHIFT_MAX 6 #ifdef SUPPORTS_MTB_TAPE_FORMAT #define TP_BUFSIZE TP_BSIZE_MAX #else #define TP_BSIZE 1024 #define TP_BUFSIZE TP_BSIZE #endif /* SUPPORTS_MTB_TAPE_FORMAT */ #define NTREC 10 #define HIGHDENSITYTREC 32 #define CARTRIDGETREC 63 #define TP_NINDIR (TP_BSIZE_MIN/2) #define TP_NINOS (TP_NINDIR / sizeof (long)) #define LBLSIZE 16 #define NAMELEN 64 #define OFS_MAGIC (int)60011 #define NFS_MAGIC (int)60012 #define MTB_MAGIC (int)60013 #define CHECKSUM (int)84446
union u_data {
char s_addrs[TP_NINDIR];
int32_t s_inos[TP_NINOS]; }; union u_shadow {
struct s_nonsh {
int32_t c_level;
char c_filesys[NAMELEN];
char c_dev[NAMELEN];
char c_host[NAMELEN];
} c_nonsh;
char c_shadow[1]; }; union u_spcl {
char dummy[TP_BUFSIZE];
struct s_spcl {
int32_t c_type;
time32_t c_date;
time32_t c_ddate;
int32_t c_volume;
daddr32_t c_tapea;
ino32_t c_inumber;
int32_t c_magic;
int32_t c_checksum;
struct dinode c_dinode;
int32_t c_count;
union u_data c_data;
char c_label[LBLSIZE];
union u_shadow c_shadow;
int32_t c_flags;
int32_t c_firstrec; #ifdef SUPPORTS_MTB_TAPE_FORMAT
int32_t c_tpbsize;
int32_t c_spare[31]; #else
int32_t c_spare[32]; #endif /* SUPPORTS_MTB_TAPE_FORMAT */ } s_spcl; } u_spcl;
int32_t c_type; time32_t c_date; time32_t c_ddate; int32_t c_volume; daddr32_t c_tapea; ino32_t c_inumber; int32_t c_magic; int32_t c_checksum; struct dinode c_dinode; int32_t c_count; union u_data c_data; char c_label[LBLSIZE]; union u_shadow c_shadow; int32_t c_flags; int32_t c_firstrec; #ifdef SUPPORTS_MTB_TAPE_FORMAT int32_t c_tpbsize; int32_t c_spare[31]; #else int32_t c_spare[32]; #endif /*
SUPPORTS_MTB_TAPE_FORMAT */
} s_spcl; } u_spcl; #define spcl u_spcl.s_spcl #define c_addr c_data.s_addrs #define c_inos c_data.s_inos #define c_level c_shadow.c_nonsh.c_level #define c_filesys c_shadow.c_nonsh.c_filesys #define c_dev c_shadow.c_nonsh.c_dev #define c_host c_shadow.c_nonsh.c_host
#define TS_TAPE 1 #define TS_INODE 2 #define TS_ADDR 4 #define TS_BITS 3 #define TS_CLRI 6 #define TS_END 5 #define TS_EOM 7 #define DR_NEWHEADER 1 #define DR_INODEINFO 2 #define DR_REDUMP 4 #define DR_TRUEINC 8 #define DR_HASMETA 16
This header describes three formats for the ufsdump/ufsrestore interface:
The constants are described as follows:
TP_BSIZE
TP_BSIZE_MIN
TP_BSIZE_MAX
NTREC
HIGHDENSITYNTREC
CARTRIDGETREC
TP_NINDIR
TP_NINOS
LBLSIZE
NAMELEN
OFS_MAGIC
NFS_MAGIC
MTB_MAGIC
CHECKSUM
The TS_ entries are used in the c_type field to indicate what sort of header this is. The types and their meanings are as follows:
TS_TAPE
TS_INODE
TS_ADDR
TS_BITS
TS_CLRI
TS_END
TS_EOM
The flags are described as follows:
DR_NEWHEADER
DR_INFODEINFO
DR_REDUMP
DR_TRUEINC
DR_HASMETA
DUMPOUTFMT
DUMPINFMT
The fields of the header structure are as follows:
s_addrs
s_inos
c_type
c_date
c_ddate
c_volume
c_tapea
c_inumber
c_magic
c_checksum
c_dinode
c_count
u_data c_data
c_label
c_level
c_filesys
c_dev
c_host
c_flags
c_firstrec
c_spare
c_tpbsize
Each volume except the last ends with a tapemark (read as an end of file). The last volume ends with a TS_END record and then the tapemark.
The dump history is kept in the file /etc/dumpdates. It is an ASCII file with three fields separated by white space:
DUMPOUTFMT is the format to use when using printf(3C) to write an entry to /etc/dumpdates; DUMPINFMT is the format to use when using scanf(3C) to read an entry from /etc/dumpdates.
See attributes(7) for a description of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Stability Level | Unstable |
ufsdump(8), ufsrestore(8), ctime(3C), printf(3C), scanf(3C), types.h(3HEAD), attributes(7),
June 19, 2021 | OmniOS |