1825662 Members
3559 Online
109686 Solutions
New Discussion

Re: tar & dd problem

 
xertusit
Trusted Contributor

tar & dd problem

Hi fellas,
i've backupped io2 file via tar. Now I want extract io2 not via tar but via dd. The operating system returned me these error:
# tar tv
-rw-r--r-- 0/1 36567531 Feb 9 12:18 2006 io2
drwx------ 0/0 0 Feb 6 15:50 2006 lost+found/
# dd if=/dev/rmt/0 of=/dev/null
read: Not enough space
0+0 records in
0+0 records out

Of course the file system where I restore the io2 file have the right space available.

Thanxs,
Massimo
9 REPLIES 9
Robert-Jan Goossens_1
Honored Contributor

Re: tar & dd problem

Massimo,

where is the file io2 ?

is this a typo?

# dd if=/dev/rmt/0 of=/dev/null
# ll /dev/rmt/0

Robert-Jan
Devender Khatana
Honored Contributor

Re: tar & dd problem

Hi,

The file backup up using tar can not be extracted using dd. dd does block by block copy and it below file level.

Use tar itself to extract the file

#tar -xvf io2 .

HTH,
Devender
Impossible itself mentions "I m possible"
xertusit
Trusted Contributor

Re: tar & dd problem

The file /dev/rmt/0 is a link to /dev/rmt/0m
Luk Vandenbussche
Honored Contributor

Re: tar & dd problem

Hi,

If your file is on a tape you must use /dev/rmt/0m
xertusit
Trusted Contributor

Re: tar & dd problem

The /dev/rmt/0 is a link to /dev/rmt/0m.
paolo barila
Valued Contributor

Re: tar & dd problem


# mt rew

# tar xvf /dev/rmt/0mn io2

share share share
xertusit
Trusted Contributor

Re: tar & dd problem

I don't interested if the data into dds data are archived via tar or frecover...I need to understand the way to dump a dds dat into a temporary file system via dd.

Massimo
Zinky
Honored Contributor

Re: tar & dd problem

Brion - Peace:

Try this:

mt -f /dev/rmt/0mn rew

Then, the following will extract the first "file" (be it tar, fbackup, dump, vxdump format) on the tape:

dd if=/dev/rmt/0mn of=/somefs/tapefile.1 bs=10240

Then test the recovered "raw" file with:

tar tvf /somefs/tapefile.1


Note: if the "tar file" on the tape was backed up with no blocking factor -- its default will be 20 (@ 512bytes). That is why you need to specificy it in your dd command.

If you've multiple "files", then just continue usingwith yur dd'd noting the bllock size of your "files". You may also use the "mt asf/fsf" file positioning commands if you want to go to a particular "file" on your tape.

Hope this helps.
Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
xertusit
Trusted Contributor

Re: tar & dd problem

There was a bs wrong...I've tried with 128k and now it's all ok!!

Massimo