1829005 Members
2458 Online
109986 Solutions
New Discussion

dd problem !!!

 
gigiz
Valued Contributor

dd problem !!!

Hi Guys,
i need of your help.
I backupped a file system of 3 Gb by ufsdump on a tape of 12 Gb.Then i want to copy by "dd" command, this tape backup on the file system but this command extract a backup of 12 Gb and not a real size of 3Gb. DD read the entire capacity of tape.
I need to solve this problem ....
Thanks a lot ....
10 REPLIES 10
Hein van den Heuvel
Honored Contributor

Re: dd problem !!!


dd sounds like too simple a tool for thsi purpose.
There are specific tape management tools for this job. Just google around for some, or hope someone else offers a specific recommendation.

Having said that, why not simply restore the tape to an alternative mountput and take it from there?

Just a thought,

Hein.
Peter Godron
Honored Contributor

Re: dd problem !!!

Hi,
if you are certain of how big your input file is, can you use the count=n option with dd ?
gigiz
Valued Contributor

Re: dd problem !!!

I need of any example ....
Peter Godron
Honored Contributor

Re: dd problem !!!

Hi,
ll a
-rw-r--r-- 40960 Feb 8 13:34 a
# Full copy of file a
dd if=a of=b
ll b
-rw-r--r-- 40960 Feb 8 13:34 b
# Partial copy/restore
dd count=2 if=b of=c
ll c
-rw-r--r-- 1024 Feb 8 13:34 c

My blocksize was 512 bytes

So if you only want the first 3Gb of the tape declare your blocksize and ajust the count accordingly (with a bit extra)

gigiz
Valued Contributor

Re: dd problem !!!

But how can know the exactly size of my backupfile and the exactly position on the tape ?
Peter Godron
Honored Contributor

Re: dd problem !!!

Hi,
I assumed you had used a new tape.
The size of your required input is at least 3Gb which was the original data backed up.
So if your blocksize is 1Mb, the count may be somethinng like 3500.
Robert-Jan Goossens_1
Honored Contributor

Re: dd problem !!!

Hi,

If you have used ufsdump to back-up this filesytem to tape, why not use ufsrestore to copy this back-up to an other filesystem?

Best regards,
Robert-Jan
gigiz
Valued Contributor

Re: dd problem !!!

ufsdump create a backup in a single file . I use dd because i want copy that file and not extract all structure whith ufsrestore.
I need a command to know the exactly size of backup file on the tape !!!
Kent Ostby
Honored Contributor

Re: dd problem !!!

Do you still have access to the original data?

If so, you could run ufsdump -vS to see what the approximate size would be and then just go a little beyond that.

"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
gigiz
Valued Contributor

Re: dd problem !!!

k