Forum Discussion

tythecellist's avatar
9 years ago

data backed up vs data stored on tape

I'm being asked by a manager to supply a report that I don't think is possible to provide ... at least not in the way that person is hoping to see it. :-/

Let's say that in a 24-hour period I back up 50 TB of data.  That (to me...) means that the sum total of the jobs that complete successfully (or, well, partially successfully) is 50 TB.

I'm being asked to show what that amount of data occupies *on tape*, without factoring in tape hardware compression.   Stay with me here.

In my mind, to get at least a reasonably accurate idea of how much tape this 50 TB backup set is using, I'd just need to know what my average tape compression ratio is, for my LTO5 tapes, and divide the 50 TB number by whatever my average per-tape capacity is (using that compression ratio.)   But again, that involves factoring in compression, and I'm being told not to do that for this report.

Aside from Accelerator or Dedupe backups, I cannot think of another way to do this.  

Anyone else?

 

  • It works something along these lines. This may not be 100% correct as non of this is documented, it's just what I've worked out ... Regarding the original query, it's not going to help as it's still 'compressed' - but I thought it might be of interest anyway. Looking at just one file in two different backups taken one after the other, the .f file is identical, the particular field of interest however, being the blknum. womble_1443432148 num len plen dlen blknum ii raw_sz GB dev_num path data 4 0 25 53 13 1 0 0 33 /netbackup/testdata/file3 33060 root root 1810 1433156057 1433156057 1443431955 womble_1443432175 num len plen dlen blknum ii raw_sz GB dev_num path data 4 0 25 53 13 1 0 0 33 /netbackup/testdata/file3 33060 root root 1810 1433156057 1433156057 1443432154 However, the 'FRAG' line info from NBDB is different (alternative way to look at this as opposed to bpimagelist output) womble_1443432148 '461','391','332','1','1','0','A00000','1000002','2','1','1','32768','A00000','6','1','262144','2','1443432148','0','0','','0','0','','','2015-09-28 09:22:54.122663','2015-09-28 09:22:54.122710' womble_1443432175 '462','392','333','1','1','0','A00000','1000002','2','1','1','32768','A00000','6','2','262144','5','1443432148','0','0','','0','0','','','2015-09-28 09:23:15.033018','2015-09-28 09:23:15.033062' The field meanings are CREATE TABLE "DBM_MAIN"."DBM_ImageFragment" ( 1 "ImageFragmentKey" unsigned bigint NOT NULL DEFAULT autoincrement 2 ,"ImageKey" unsigned bigint NOT NULL 3 ,"ImageCopyKey" unsigned bigint NOT NULL 4 ,"CopyNumber" integer NOT NULL 5 ,"FragmentNumber" integer NOT NULL 6 ,"ResumeCount" integer NOT NULL 7 ,"MediaID" varchar(1024) NOT NULL 8 ,"MediaServerKey" unsigned int NULL DEFAULT 0 9 ,"StorageUnitType" integer NOT NULL DEFAULT 0 10 ,"StuSubType" smallint NOT NULL DEFAULT 0 11 ,"FragmentState" smallint NOT NULL 12 ,"FragmentSize" bigint NOT NULL DEFAULT 0 13 ,"FragmentID" varchar(4096) NOT NULL DEFAULT '' 14 ,"Density" integer NOT NULL DEFAULT 0 15 ,"FileNum" integer NOT NULL DEFAULT 0 16 ,"BlockSize" integer NOT NULL DEFAULT 0 17 ,"Offset" integer NOT NULL DEFAULT 0 18 ,"MediaDate" bigint NOT NULL DEFAULT 0 19 ,"DeviceWrittenOn" integer NOT NULL DEFAULT 0 20 ,"FFlags" integer NOT NULL DEFAULT 0 21 ,"MediaDescription" varchar(1024) NOT NULL DEFAULT '' 22 ,"FragmentCheckpoint" smallint NOT NULL DEFAULT 0 23 ,"MediaSequenceNum" integer NOT NULL DEFAULT 0 24 ,"MediaExtents" varchar(4096) NOT NULL DEFAULT '' 25 ,"SnapshotClientMountHost" varchar(1024) NOT NULL DEFAULT '' 26 ,"CreatedDateTime" timestamp NOT NULL DEFAULT current utc timestamp 27 ,"LastModifiedDateTime" timestamp NOT NULL DEFAULT utc timestamp 28 ,CONSTRAINT "PK_DBM_IMAGEFRAGMENT" PRIMARY KEY ("ImageFragmentKey" ASC) The 17th field is offset, '2' for the womble_1443432148 backup, '5' for the womble_1443432175 backup The offset is the starting position of the fragment, relative to the beginning of the tape. Looking at what's on the tape with scsi_command -map root@womble db $ scsi_command -map -f /dev/rmt/0cbn 00000000: file 1: record 1: size 1024: NBU MEDIA header (A00000) 00000001: file 1: eof after 1 records: 1024 bytes 00000002: file 2: record 1: size 1024: NBU BACKUP header backup_id womble_1443432148: frag 1: file 1: copy 1 expiration 1443435748: retention 10: block_size 262144 flags 0x0: mpx_headers 0: resume_count 0: media A00000 00000003: file 2: record 2: size 32768 00000004: file 2: eof after 2 records: 33792 bytes 00000005: file 3: record 1: size 1024: NBU BACKUP header backup_id womble_1443432175: frag 1: file 2: copy 1 expiration 1443435775: retention 10: block_size 262144 flags 0x0: mpx_headers 0: resume_count 0: media A00000 00000006: file 3: record 2: size 32768 00000007: file 3: eof after 2 records: 33792 bytes 00000008: file 4: record 1: size 1024: NBU EMPTY header (file 3) 00000009: file 4: eof after 1 records: 1024 bytes eot The first column '00000000:' etc ... is the offset position ... and the backup headers show as being offset 00000002 and 00000005, which aligns with what is given in the image fragment table. So, knowing the starting position (image table) of the fragment relative to the beginning of the tape, and, the file position from the .f file, relative to the beginning of the fragment positions of files and amount of tape used can be worked out.

27 Replies