command to find the data size on the backup tape

Hi,We are backuping several directories (/database, /index) to a backup tape. How could I find out how much space these data are taking on the backup tape? we use the cpio command to backup.Thanks,Cinderella
[235 byte] By [Cinderella99a] at [2007-11-27 7:27:58]
# 1

> We are backuping several directories (/database,

> /index) to a backup tape. How could I find out how

> much space these data are taking on the backup tape?

> we use the cpio command to backup.

There's no obvious way to do so. Why do you want to know?

One method might be to write to a 'dd' which places the data on tape. The dd will write the amount of blocks written to STDERR. You can use that as an approximation of the data written.

What would you hope to use that information for? What type of tapes are you writing to?

--

Darren

Darren_Dunhama at 2007-7-12 19:08:14 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 2
> There's no obvious way to do so. Why do you want to know?why not? Isnt "du -sh /database /index" exactly doing the task?For older Solaris versions (like 8) du might not know the -h (human readable) option. Use -k (Kilobytes) instead.--David
DavidSchulza at 2007-7-12 19:08:14 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 3

Hi guys,

Thanks for replying to my question! We need to get a quote on remote storage. The vendor needs to know how much space our data will take. I could find out the size of the data on the server by "du -dk" or "df -lh", but I thought the size of the data might be smaller on the tape? The media type we are using is SDLT320. Its capacity is 320 GB.

Thank,

Cinderella

Cinderella99a at 2007-7-12 19:08:14 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 4
problem solved. I used this command to estimate the the number of bytes that the system requires for a complete backup:#ufsdump 0S filesystem_nameThanks!Cinderella
Cinderella99a at 2007-7-12 19:08:14 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 5

> > There's no obvious way to do so. Why do you want to

> know?

>

> why not? Isnt "du -sh /database /index" exactly doing

> the task?

Well it depends on exactly what is wanted, but phrases like "space taken up on tape" suggest to me that the OP wants to know how much tape is used (or how much tape is left) rather than a figure for the data size in bytes.

Due to data-dependent compression and error detection rewrites, it is very difficult to determine exactly how much tape is used for writes, or how much data will fit on remaining tape.

You can determing how much you've written, but that amount doesn't necessarily tell you anyhing about the tape capacity.

Also, 'du' will give you some information about the source (assuming you're not using exclusions), but various backup protocols will have different amounts of overhead. The more files you have, the more likely the overhead will be significant.

--

Darren

Darren_Dunhama at 2007-7-12 19:08:14 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 6
By doing a ufsdump to disk, your not allowing for tape compression.How much compression you get depends on the nature of your data.But unless youve got a lot of already compressed data in your filesystems, 50% is a reasonable rule of thumb.
robert.cohena at 2007-7-12 19:08:14 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 7
Thank you all for your replies!
Cinderella99a at 2007-7-12 19:08:14 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...