Difference between cpio copy and tar copy

From: Steven Sim (steven.sim_at_faplccc.net)
Date: 03/24/05

  • Next message: Chris Hoogendyk: "[Summary ] SSL on Solaris 9 -- already there? or not?"
    To: <sunmanagers@sunmanagers.org>
    Date: Thu, 24 Mar 2005 19:28:30 +0800
    
    

    Hello Sun Gurus;

     

    I recently had to dump almost 100 Gbyte of data from a mounted read only
    vxfs volume to a newly formatted ufs mount point.

     

    So I used the following command

     

    #cd /<source directory>

    #find . | cpio -pdmv <target directory>

     

    Lo and behold, the above command worked.

     

    To a point. It ended after copying about 23 Gbyte of data with the following
    messages;

     

    .

    .

    .

    /xxyy/qerust/abcdefg.LOG

    48581232 blocks

    3 error(s)

     

    Why did it stop before the whole directory was copied? Surely not because of
    the 3 errors! The 3 errors occurred somewhere in the middle of the cpio
    operation well before the cpio stopped seemingly gracefully.

     

    I had thought cpio was a lot more advanced than a simple cp operation.

     

    My colleague subsequently asked me to use the following command

     

    #cd /<source directory>

    #tar -cf - * | (cd /<target directory>;tar -xf -)

     

    Which successfully copied the whole thing.

     

    My question is why did cpio not worked properly and which of the above
    command is more appropriate for a large copy operation? And which is faster?

     

    Warmest Regards
    Steven Sim

    Service Delivery Manager

    Fujitsu Asia Pte Ltd

    Company Registration Number 199701545D

    20 Science Park Road

    #03-01 Teletech Park

    Singapore Science Park II

    Singapore 117674

    Tel: +65-6512-7555

    DID: +65-6512-7616

    Fax: +65-6512-7600

     

     

    Fujitsu Asia Pte. Ltd.
    _____________________________________________________

    This e-mail is confidential and may also be privileged. If you are not the intended recipient, please notify us immediately. You should not copy or use it for any purpose, nor disclose its contents to any other person.

    Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by it.
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers


  • Next message: Chris Hoogendyk: "[Summary ] SSL on Solaris 9 -- already there? or not?"

    Relevant Pages

    • Re: File Copy
      ... a terminal and not at the console, have you looked for messages on the ... command might seem to hang, but there should be "no space" messages on the ... As for some kind of status display, the "v" option in that cpio command ...
      (comp.unix.sco.misc)
    • RE: Data transfer from one HD to another
      ... Is there an EASY method to transfer the partitions from an old hard ... command "dd". ... Other commands that may be used are: tar & cpio (man tar & man cpio for ...
      (freebsd-stable)
    • RE: How copy /usr contents to a new partition?
      ... >> I want to copy /usr to a new partition and then attach that ... >> issued a command ... filter them out with grep before cpio sees them. ... are moving tons of small files. ...
      (Fedora)
    • Re: Data transfer from one HD to another
      ... I presume you want to trasfer all the files from one ... command "dd". ... Other commands that may be used are: tar & cpio (man tar & man cpio for ...
      (freebsd-stable)