JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 4: File Formats     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

Introduction

File Formats

addresses(4)

admin(4)

ai_manifest(4)

alias(4)

aliases(4)

a.out(4)

au(4)

audit_class(4)

audit_event(4)

audit.log(4)

auth_attr(4)

autofs(4)

bart_manifest(4)

bart_rules(4)

bootparams(4)

cardbus(4)

compver(4)

contents(4)

contract(4)

copyright(4)

core(4)

crypt.conf(4)

crypto_certs(4)

dacf.conf(4)

dat.conf(4)

dc_manifest(4)

defaultdomain(4)

default_fs(4)

defaultrouter(4)

depend(4)

device_allocate(4)

device_contract(4)

device_maps(4)

devices(4)

devid_cache(4)

devname_cache(4)

dfstab(4)

dhcp_inittab(4)

dhcp_network(4)

dhcpsvc.conf(4)

dhcptab(4)

dialups(4)

dir(4)

dir_ufs(4)

d_passwd(4)

driver(4)

driver.conf(4)

ds.log(4)

dumpdates(4)

ethers(4)

exec_attr(4)

fbtab(4)

fd(4)

fdi(4)

flash_archive(4)

format.dat(4)

forward(4)

fs(4)

fspec(4)

fstypes(4)

ftp(4)

ftpusers(4)

fx_dptbl(4)

gateways(4)

geniconvtbl(4)

group(4)

gsscred.conf(4)

hba.conf(4)

holidays(4)

hosts(4)

hosts.equiv(4)

ib(4)

idnkit.pc(4)

ike.config(4)

ike.preshared(4)

inetd.conf(4)

inet_type(4)

infiniband_hca_persistent_cache(4)

init.d(4)

inittab(4)

ipaddrsel.conf(4)

ipf(4)

ipf.conf(4)

ipnat(4)

ipnat.conf(4)

ipnodes(4)

ippool(4)

ippool.conf(4)

isa(4)

issue(4)

kadm5.acl(4)

kdc.conf(4)

keytables(4)

krb5.conf(4)

label_encodings(4)

ldapfilter.conf(4)

ldapsearchprefs.conf(4)

ldaptemplates.conf(4)

llc2(4)

logadm.conf(4)

logindevperm(4)

loginlog(4)

magic(4)

md.cf(4)

mddb.cf(4)

mdi_ib_cache(4)

mdi_scsi_vhci_cache(4)

md.tab(4)

mech(4)

meddb(4)

mnttab(4)

mod_ipp(4)

mpapi.conf(4)

named.conf(4)

ncad_addr(4)

nca.if(4)

ncakmod.conf(4)

ncalogd.conf(4)

ncaport.conf(4)

ndmp(4)

ndpd.conf(4)

netconfig(4)

netgroup(4)

netid(4)

netmasks(4)

netrc(4)

networks(4)

nfs(4)

nfslog.conf(4)

nfssec.conf(4)

NISLDAPmapping(4)

nodename(4)

nologin(4)

note(4)

notrouter(4)

nscd.conf(4)

nss(4)

nsswitch.conf(4)

packingrules(4)

pam.conf(4)

pam.d(4)

passwd(4)

path_to_inst(4)

pci(4)

pcie(4)

pci_unitaddr_persistent(4)

phones(4)

pkginfo(4)

pkgmap(4)

plot(4B)

policy.conf(4)

priv_names(4)

proc(4)

process(4)

prof_attr(4)

profile(4)

project(4)

protocols(4)

prototype(4)

pseudo(4)

publickey(4)

qop(4)

queuedefs(4)

rcmscript(4)

rdc.cf(4)

registration_profile(4)

remote(4)

resolv.conf(4)

rhosts(4)

rmtab(4)

rndc.conf(4)

rpc(4)

rt_dptbl(4)

sasl_appname.conf(4)

sbus(4)

sccsfile(4)

scsi(4)

securenets(4)

sel_config(4)

sendmail(4)

sendmail.cf(4)

service_bundle(4)

service_provider.conf(4)

services(4)

shadow(4)

sharetab(4)

shells(4)

slp.conf(4)

slpd.reg(4)

smb(4)

smbautohome(4)

smhba.conf(4)

snapshot_cache(4)

sndr(4)

sock2path.d(4)

space(4)

ssh_config(4)

sshd_config(4)

submit.cf(4)

sulog(4)

sysbus(4)

syslog.conf(4)

system(4)

telnetrc(4)

term(4)

terminfo(4)

TIMEZONE(4)

timezone(4)

TrustedExtensionsPolicy(4)

ts_dptbl(4)

ttydefs(4)

ttysrch(4)

ufsdump(4)

updaters(4)

user_attr(4)

utmp(4)

utmpx(4)

vfstab(4)

volume-config(4)

volume-defaults(4)

volume-request(4)

wanboot.conf(4)

warn.conf(4)

wtmp(4)

wtmpx(4)

ypfiles(4)

yppasswdd(4)

ypserv(4)

zoneinfo(4)

ufsdump

, dumpdates

- incremental dump format

Synopsis

#include <sys/types.h>
#include <sys/inode.h>
#include <protocols/dumprestore.h>
/etc/dumpdates

Description

Tapes used by ufsdump(1M) and ufsrestore(1M) 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

Size of file blocks on the dump tapes for the old format. Note that TP_BSIZE must be a multiple of DEV_BSIZE This is applicable for dumps of type NFS_MAGIC or OFS_MAGIC, but is not applicable for dumps of type MTB_MAGIC.

TP_BSIZE_MIN

Minimum size of file blocks on the dump tapes for the new MTB format (MTB_MAGIC) only.

TP_BSIZE_MAX

Maximum size of file blocks on the dump tapes for the new MTB format (MTB_MAGIC) only.

NTREC

Number of TP_BSIZE blocks that are written in each tape record.

HIGHDENSITYNTREC

Number of TP_BSIZE blocks that are written in each tape record on 6250 BPI or higher density tapes.

CARTRIDGETREC

Number of TP_BSIZE blocks that are written in each tape record on cartridge tapes.

TP_NINDIR

Number of indirect pointers in a TS_INODE or TS_ADDR record. It must be a power of 2.

TP_NINOS

The maximum number of volumes on a tape.

LBLSIZE

The maximum size of a volume label.

NAMELEN

The maximum size of a host's name.

OFS_MAGIC

Magic number that is used for the very old format.

NFS_MAGIC

Magic number that is used for the non-MTB format.

MTB_MAGIC

Magic number that is used for the MTB format.

CHECKSUM

Header records checksum to this value.

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

Tape volume label.

TS_INODE

A file or directory follows. The c_dinode field is a copy of the disk inode and contains bits telling what sort of file this is.

TS_ADDR

A subrecord of a file description. See s_addrs below.

TS_BITS

A bit map follows. This bit map has a one bit for each inode that was dumped.

TS_CLRI

A bit map follows. This bit map contains a zero bit for all inodes that were empty on the file system when dumped.

TS_END

End of tape record.

The flags are described as follows:

DR_NEWHEADER

New format tape header.

DR_INFODEINFO

Header contains starting inode info.

DR_REDUMP

Dump contains recopies of active files.

DR_TRUEINC

Dump is a “true incremental”.

DR_HASMETA

The metadata in this header.

DUMPOUTFMT

Name, incon, and ctime (date) for printf.

DUMPINFMT

Inverse for scanf.

The fields of the header structure are as follows:

s_addrs

An array of bytes describing the blocks of the dumped file. A byte is zero if the block associated with that byte was not present on the file system; otherwise, the byte is non-zero. If the block was not present on the file lsystem, no block was dumped; the block will be stored as a hole in the file. If there is not sufficient space in this record to describe all the blocks in a file, TS_ADDR records will be scattered through the file, each one picking up where the last left off

s_inos

The starting inodes on tape.

c_type

The type of the record.

c_date

The date of the previous dump.

c_ddate

The date of this dump.

c_volume

The current volume number of the dump.

c_tapea

The logical block of this record.

c_inumber

The number of the inode being dumped if this is of type TS_INODE.

c_magic

This contains the value MAGIC above, truncated as needed.

c_checksum

This contains whatever value is needed to make the record sum to CHECKSUM.

c_dinode

This is a copy of the inode as it appears on the file system.

c_count

The count of bytes in s_addrs.

u_data c_data

The union of either u_data c_data The union of either s_addrs or s_inos.

c_label

Label for this dump.

c_level

Level of this dump.

c_filesys

Name of dumped file system.

c_dev

Name of dumped service.

c_host

Name of dumped host.

c_flags

Additional information.

c_firstrec

First record on volume.

c_spare

Reserved for future uses.

c_tpbsize

Tape block size for MTB format only.

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.

Attributes

See attributes(5) for a description of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Uncommitted

See Also

ufsdump(1M), ufsrestore(1M), ctime(3C), printf(3C), scanf(3C), types.h(3HEAD), attributes(5),