MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


File Formats                                           ufsdump(4)



NAME
     ufsdump, dumpdates - incremental dump format

SYNOPSIS
     #include 


     #include 


     #include 


     /etc/dumpdates


DESCRIPTION
     Tapes used by ufsdump(1M) and ufsrestore(1M) contain:

         o    a header record

         o    two groups of bit map records

         o    a group of records describing directories

         o    a group of records describing files


     The format of the header record and the format of the  first
     record  of each description in the 
     include file are:

       #define TPBSIZEMAX    65536
       #define TPBSIZEMIN    1024
       #define ESIZESHIFTMAX 6

       #ifdef SUPORTSMTBTAPEFORMAT
       #define TPBUFSIZE      TPBSIZEMAX
       #else
       #define TPBSIZE        1024
       #define TPBUFSIZE      TPBSIZE
       #endif /* SUPORTSMTBTAPEFORMAT */

       #define NTREC           10
       #define HIGHDENSITYTREC 32
       #define CARTRIDGETREC   63
       #define TPNINDIR       (TPBSIZEMIN/2)
       #define TPNINOS        (TPNINDIR / sizeof (long))
       #define LBLSIZE         16
       #define NAMELEN         64

       #define OFSMAGIC       (int)60011



SunOS 5.11           Last change: 9 Apr 2003                    1






File Formats                                           ufsdump(4)



       #define NFSMAGIC       (int)60012
       #define MTBMAGIC       (int)60013
       #define CHECKSUM        (int)84446


       union udata {
               char    saddrs[TPNINDIR];
               int32t sinos[TPNINOS];
       };

       union ushadow {
               struct snonsh {
                       int32t clevel;
                       char    cfilesys[NAMELEN];
                       char    cdev[NAMELEN];
                       char    chost[NAMELEN];
               } cnonsh;
               char    cshadow[1];
       };

       union uspcl {
               char dummy[TPBUFSIZE];
               struct  sspcl {
                       int32t ctype;
                       time32t cdate;
                       time32t cddate;
                       int32t cvolume;
                       daddr32t ctapea;
                       ino32t cinumber;
                       int32t cmagic;
                       int32t cchecksum;
                       struct  dinode  cdinode;
                       int32t ccount;
                       union   udata cdata;
                       char    clabel[LBLSIZE];
                       union   ushadow cshadow;
                       int32t cflags;
                       int32t cfirstrec;
       #ifdef SUPORTSMTBTAPEFORMAT
                       int32t ctpbsize;
                       int32t cspare[31];
       #else
                       int32t cspare[32];
       #endif /* SUPORTSMTBTAPEFORMAT */
       } sspcl;
       } uspcl;


       int32t                    ctype;
       time32t                   cdate;
       time32t                   cddate;
       int32t                    cvolume;



SunOS 5.11           Last change: 9 Apr 2003                    2






File Formats                                           ufsdump(4)



       daddr32t                  ctapea;
       ino32t                    cinumber;
       int32t                    cmagic;
       int32t                    cchecksum;
       struct dinode              cdinode;
       int32t                    ccount;
       union                      udata cdata;
       char                       clabel[LBLSIZE];
       union                      ushadow cshadow;
       int32t                    cflags;
       int32t                    cfirstrec;
       #ifdef SUPORTSMTBTAPEFORMAT
       int32t                    ctpbsize;
       int32t                    cspare[31];
       #else
       int32t                    cspare[32];
       #endif                       /*
            SUPORTSMTBTAPEFORMAT */


          } sspcl;
       } uspcl;
       #define spcl uspcl.sspcl
       #define caddr cdata.saddrs
       #define cinos cdata.sinos
       #define clevel cshadow.cnonsh.clevel
       #define cfilesys cshadow.cnonsh.cfilesys
       #define cdev cshadow.cnonsh.cdev
       #define chost cshadow.cnonsh.chost


       #define TSTAPE         1
       #define TSINODE        2
       #define TSADR         4
       #define TSBITS         3
       #define TSCLRI         6
       #define TSEND          5
       #define TSEOM          7

       #define DRNEWHEADER    1
       #define DRINODEINFO    2
       #define DREDUMP       4
       #define DRTRUEINC      8
       #define DRHASMETA      16



     This   header    describes    three    formats    for    the
     ufsdump/ufsrestore interface:

         o    An old format, non-MTB, that supports dump sizes of
              less  than  2 terabytes. This format is represented



SunOS 5.11           Last change: 9 Apr 2003                    3






File Formats                                           ufsdump(4)



              by NFSMAGIC.

         o    A new format, MTB,  that  supports  dump  sizes  of
              greater  than  2  terabytes  using a variable block
              size  and  2  new   constants:   TPBSIZEMIN   and
              TPBSIZEMAX.   This   format   is  represented  by
              MTBMAGIC.

         o    A much older format that might be found on existing
              backup  tapes.  The  ufsrestore command can restore
              tapes of this format, but no longer generates tapes
              of  this  format.  Backups  in this format have the
              OFSMAGIC magic number in their tape headers.


     The constants are described as follows:

     TPBSIZE            Size of file blocks on  the  dump  tapes
                         for  the  old format. Note that TPBSIZE
                         must be a multiple of DEVBSIZE This  is
                         applicable  for  dumps of type NFSMAGIC
                         or OFSMAGIC, but is not applicable  for
                         dumps of type MTBMAGIC.


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


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


     NTREC               Number of TPBSIZE blocks that are writ-
                         ten in each tape record.


     HIGHDENSITYNTREC    Number of TPBSIZE blocks that are writ-
                         ten  in each tape record on  6250 BPI or
                         higher density tapes.


     CARTRIDGETREC       Number of TPBSIZE blocks that are writ-
                         ten  in  each  tape  record on cartridge
                         tapes.


     TPNINDIR           Number  of  indirect   pointers   in   a
                         TSINODE or TSADR record. It must be a
                         power of 2.



SunOS 5.11           Last change: 9 Apr 2003                    4






File Formats                                           ufsdump(4)



     TPNINOS            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.


     OFSMAGIC           Magic number that is used for  the  very
                         old format.


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


     MTBMAGIC           Magic number that is used  for  the  MTB
                         format.


     CHECKSUM            Header records checksum to this value.



     The TS entries are used in the  ctype  field  to  indicate
     what  sort  of  header this is. The types and their meanings
     are as follows:

     TSTAPE     Tape volume label.


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


     TSADR     A subrecord of a file description.  See  saddrs
                 below.


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


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


     TSEND      End of tape record.




SunOS 5.11           Last change: 9 Apr 2003                    5






File Formats                                           ufsdump(4)



     TSEOM      diskette  EOMindicates that the restore is  com-
                 patible with old dump



     The flags are described as follows:

     DRNEWHEADER     New format tape header.


     DRINFODEINFO    Header contains starting inode info.


     DREDUMP        Dump contains recopies of active files.


     DRTRUEINC       Dump is a "true incremental".


     DRHASMETA       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:

     saddrs          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 suffi-
                      cient space in this record to  describe all
                      the blocks in a file,  TSADR records will
                      be scattered through  the  file,  each  one
                      picking up where the  last left off


     sinos           The starting inodes on tape.


     ctype           The type of the record.






SunOS 5.11           Last change: 9 Apr 2003                    6






File Formats                                           ufsdump(4)



     cdate           The date of the previous dump.


     cddate          The date of this dump.


     cvolume         The current volume number of the dump.


     ctapea          The logical block of this record.


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


     cmagic          This contains the value MAGIC above,  trun-
                      cated as needed.


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


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


     ccount          The count of bytes in saddrs.


     udata cdata    The union  of  either   udata  cdata  The
                      union of either  saddrs or  sinos.


     clabel          Label for this dump.


     clevel          Level of this dump.


     cfilesys        Name of dumped file system.


     cdev            Name of dumped service.


     chost           Name of dumped host.


     cflags          Additional information.




SunOS 5.11           Last change: 9 Apr 2003                    7






File Formats                                           ufsdump(4)



     cfirstrec       First record on volume.


     cspare          Reserved for future uses.


     ctpbsize        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 TSEND record and
     then the tapemark.


     The dump history is kept in the file /etc/dumpdates.  It  is
     an ASCI file with three fields separated by white space:

         o    The name of the device on  which  the  dumped  file
              system resides.

         o    The level number of the dump tape; see ufsdump(1M).

         o    The date of the incremental dump in the format gen-
              erated by ctime(3C).


     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.

ATRIBUTES
     See attributes(5) for a description of the following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Stability Level              Unstable                    
    


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







SunOS 5.11           Last change: 9 Apr 2003                    8



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™