tar -C foo -c . | tar -C bar -x ends up with nothing on read errors

Marcin Owsiany marcin.owsiany at guardian.co.uk
Mon Oct 29 15:07:07 UTC 2007


Package: tar
Version: 1.15.1-2ubuntu2.2
Severity: normal

I was hoping to save what I can from a disk which starts to show read
errors, by using a command like:

sudo tar --ignore-failed-read  -C /media/data_big -cv -f - . | sudo tar -C /mnt -x -f -

Unfortunately, after the reading tar encountered about four unreadable
files, the two processes got desynchronized somehow, and stracing the
receiver tar revealed that it did nothing but read lots of data from
standard input.  As a result, nothing got to the destination disk after
the read errors were encountered.

-- System Information:
Debian Release: testing/unstable
  APT prefers dapper-updates
  APT policy: (500, 'dapper-updates'), (500, 'dapper-security'), (500, 'dapper')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-29-686
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)

Versions of packages tar depends on:
ii  libc6                  2.3.6-0ubuntu20.5 GNU C Library: Shared libraries an

tar recommends no packages.

-- no debconf information

------------------------------------------------------------------
Visit Guardian Unlimited - the UK's most popular newspaper website
http://guardian.co.uk http://observer.co.uk
------------------------------------------------------------------
The Newspaper Marketing Agency
Opening Up Newspapers
http://www.nmauk.co.uk
------------------------------------------------------------------

This e-mail and all attachments are confidential and may also
be privileged. If you are not the named recipient, please notify
the sender and delete the e-mail and all attachments immediately.
Do not disclose the contents to another person. You may not use
the information for any purpose, or store, or copy, it in any way.

Guardian News & Media Limited is not liable for any computer
viruses or other material transmitted with or as part of this
e-mail. You should employ virus checking software.

Guardian News & Media Limited
A member of Guardian Media Group PLC
Registered Office
Number 1 Scott Place, Manchester M3 3GG
Registered in England Number 908396




More information about the ubuntu-users mailing list