I am copying an image with dd if=/dev/hdc1 of=/image Now, I would like to pipe this in order to get this image tgz'ed in ONE task. appending | tar -cz does not work. Any help out there? thanks! -- *º¤., ¸¸,.¤º*¨¨¨*¤ =Oliver@home= *º¤., ¸¸,.¤º*¨¨*¤ I http://www.bmw-roadster.de/Friends/Olli/olli.html I I http://www.bmw-roadster.de/Friends/friends.html I I http://groups.yahoo.com/group/VGAP-93 I I http://home.t-online.de/home/spacecraft.portal I
Telek0ma iBBMS - soon back online +49.4503.TRSi1/TRSi2 <<<
On Tuesday 22 January 2002 11.13, Oliver Ob wrote:
I am copying an image with
dd if=/dev/hdc1 of=/image
of=/image will put the output data in the file "/image". Use standard output if you want to pipe it through to other tasks.
Now, I would like to pipe this in order to get this image tgz'ed in ONE task.
appending | tar -cz
Don't use - with parameters to gnu tar. It is deprecated and may disappear in future versions, breaking all your scripts.
does not work. Any help out there? thanks!
dd if=/dev/hdc1 | tar czf out.tgz - should work regards Anders
On Tuesday 22 January 2002 11.18, Anders Johansson wrote:
dd if=/dev/hdc1 | tar czf out.tgz -
Erm, second thoughts. You don't need tar when you're not working on files. dd if=/dev/hdc1|gzip - > out.gz will get you a zipped version of the partition. //Anders
Anders Johansson schrieb:
On Tuesday 22 January 2002 11.18, Anders Johansson wrote:
dd if=/dev/hdc1 | tar czf out.tgz -
Erm, second thoughts. You don't need tar when you're not working on files.
dd if=/dev/hdc1|gzip - > out.gz
will get you a zipped version of the partition.
Thanks Anders, this works fine, but as of today I am trying to write that .gz file back to hdc1 - but how? I have never really understood the system which you use above. - is stdout right? I did: dd if=/dev/hda1|gzip - > /mnt/Telek0ma/mnt/sda2/Aunp.gz -9 works also fine: dd if=/dev/hda1|gzip -9 - > /mnt/Telek0ma/mnt/sda2/Aunp.gz But how to write that back? gunzip Aunp.gz|dd of=/dev/hda1 does not work, even not when I add if=- or so Please help, I need that done for tonight. Olli -- *º¤., ¸¸,.¤º*¨¨¨*¤ =Oliver@home= *º¤., ¸¸,.¤º*¨¨*¤ I http://www.bmw-roadster.de/Friends/Olli/olli.html I I http://www.bmw-roadster.de/Friends/friends.html I I http://groups.yahoo.com/group/VGAP-93 I I mailto:VGAP-93-subscribe@yahoogroups.com I I http://home.t-online.de/home/spacecraft.portal I
Telek0ma iBBMS - now back online +49.4504.TRSi1/TRSi2 <<<
Anders Johansson schrieb:
On Tuesday 23 July 2002 19.36, Oliver Ob wrote:
gunzip Aunp.gz|dd of=/dev/hda1
Try
zcat Aunp.gz|dd of=/dev/hda1
That should work.
Good! Gonna try that out now. But what is the diff between using ZCAT and standard CAT? -- *º¤., ¸¸,.¤º*¨¨¨*¤ =Oliver@home= *º¤., ¸¸,.¤º*¨¨*¤ I http://www.bmw-roadster.de/Friends/Olli/olli.html I I http://www.bmw-roadster.de/Friends/friends.html I I http://groups.yahoo.com/group/VGAP-93 I I mailto:VGAP-93-subscribe@yahoogroups.com I I http://home.t-online.de/home/spacecraft.portal I
Telek0ma iBBMS - now back online +49.4504.TRSi1/TRSi2 <<<
Anders Johansson schrieb:
On Tuesday 23 July 2002 20.15, Oliver Ob wrote:
Gonna try that out now. But what is the diff between using ZCAT and standard CAT?
zcat will gunzip the input file before CATing it to stdout.
//Anders
I have no room for the unzipped image. That's why I instinctively tried standard cat. Now, having tried that and verified that both the source and the new target partiotion have EXACTLY the same size there has occured this: xxx records in xxx records out but! the "in" amount of blocks is ONE higher that the written! how come? -- *º¤., ¸¸,.¤º*¨¨¨*¤ =Oliver@home= *º¤., ¸¸,.¤º*¨¨*¤ I http://www.bmw-roadster.de/Friends/Olli/olli.html I I http://www.bmw-roadster.de/Friends/friends.html I I http://groups.yahoo.com/group/VGAP-93 I I mailto:VGAP-93-subscribe@yahoogroups.com I I http://home.t-online.de/home/spacecraft.portal I
Telek0ma iBBMS - now back online +49.4504.TRSi1/TRSi2 <<<
On Tuesday 23 July 2002 20.23, Oliver Ob wrote:
I have no room for the unzipped image. That's why I instinctively tried standard cat.
I'm not sure I understand this. cat will just take the input file and copy it to stdout. Since the file was zipped you have to unzip it before you can write it to the partition. zcat will only unzip to stdout, it won't write any files, so you can use it even if you're low on disk space.
Now, having tried that and verified that both the source and the new target partiotion have EXACTLY the same size there has occured this:
xxx records in xxx records out
but! the "in" amount of blocks is ONE higher that the written!
You've mounted the new partition you created and verified that it's exactly the same as the original?
how come?
I'm not completely sure. dd should write out everything it receives as input. Perhaps the target partition was one block smaller than the original?! Have you checked the sizes of the partitions with the size values in bytes? Have you fscked the new partition to make sure there aren't any errors? //Anders
Anders Johansson schrieb:
Now, having tried that and verified that both the source and the new target partiotion have EXACTLY the same size there has occured this:
xxx records in xxx records out
but! the "in" amount of blocks is ONE higher that the written!
You've mounted the new partition you created and verified that it's exactly the same as the original?
I wrote _just_that_ 10 lines above :-)
I'm not completely sure. dd should write out everything it receives as input. Perhaps the target partition was one block smaller than the original?! Have you checked the sizes of the partitions with the size values in bytes? Have you fscked the new partition to make sure there aren't any errors?
All done. Fdisk says precisely that the number of cyls is the same. the block sizes are the same. the one and only difference is that source is EIDE and target is on SCSI But how come the gzipped backup is one block larger than the original data!!?!?!?? what does gzip add there? -- *º¤., ¸¸,.¤º*¨¨¨*¤ =Oliver@home= *º¤., ¸¸,.¤º*¨¨*¤ I http://www.bmw-roadster.de/Friends/Olli/olli.html I I http://www.bmw-roadster.de/Friends/friends.html I I http://groups.yahoo.com/group/VGAP-93 I I mailto:VGAP-93-subscribe@yahoogroups.com I I http://home.t-online.de/home/spacecraft.portal I
Telek0ma iBBMS - now back online +49.4504.TRSi1/TRSi2 <<<
On Tuesday 23 July 2002 20.40, Oliver Ob wrote:
I wrote _just_that_ 10 lines above :-)
No, you said you checked the sizes. I wondered if you had verified the content as well. A thorough fsck is never a bad idea if you suspect that something has gone wrong. If you had tripwire set up on the old partition now would be a good time to verify those md5 sums too.
But how come the gzipped backup is one block larger than the original data!!?!?!?? what does gzip add there?
No ideas at present, but if the data is valid it's probably unimportant. //Anders
Anders Johansson schrieb:
On Tuesday 23 July 2002 20.40, Oliver Ob wrote:
I wrote _just_that_ 10 lines above :-)
No, you said you checked the sizes. I wondered if you had verified the content as well. A thorough fsck is never a bad idea if you suspect that something has gone wrong. If you had tripwire set up on the old partition now would be a good time to verify those md5 sums too.
But how come the gzipped backup is one block larger than the original data!!?!?!?? what does gzip add there?
No ideas at present, but if the data is valid it's probably unimportant.
//Anders
I am running diff -rqs on all of it just now. So far no differences found... Strange. -- *º¤., ¸¸,.¤º*¨¨¨*¤ =Oliver@home= *º¤., ¸¸,.¤º*¨¨*¤ I http://www.bmw-roadster.de/Friends/Olli/olli.html I I http://www.bmw-roadster.de/Friends/friends.html I I http://groups.yahoo.com/group/VGAP-93 I I mailto:VGAP-93-subscribe@yahoogroups.com I I http://home.t-online.de/home/spacecraft.portal I
Telek0ma iBBMS - now back online +49.4504.TRSi1/TRSi2 <<<
Anders Johansson schrieb:
On Tuesday 23 July 2002 20.40, Oliver Ob wrote:
I wrote _just_that_ 10 lines above :-)
No, you said you checked the sizes. I wondered if you had verified the content as well. A thorough fsck is never a bad idea if you suspect that something has gone wrong. If you had tripwire set up on the old partition now would be a good time to verify those md5 sums too.
But how come the gzipped backup is one block larger than the original data!!?!?!?? what does gzip add there?
No ideas at present, but if the data is valid it's probably unimportant.
//Anders
I am running diff -rqs on all of it just now. So far no differences found... Strange. NO DIFFERENCES found!! -- *º¤., ¸¸,.¤º*¨¨¨*¤ =Oliver@home= *º¤., ¸¸,.¤º*¨¨*¤ I http://www.bmw-roadster.de/Friends/Olli/olli.html I I http://www.bmw-roadster.de/Friends/friends.html I I http://groups.yahoo.com/group/VGAP-93 I I mailto:VGAP-93-subscribe@yahoogroups.com I I http://home.t-online.de/home/spacecraft.portal I
Telek0ma iBBMS - now back online +49.4504.TRSi1/TRSi2 <<<
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com
participants (2)
-
Anders Johansson
-
Oliver Ob