bug-cpio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-cpio] How to recover a corrupt cpio archive


From: Christopher Michaels
Subject: [Bug-cpio] How to recover a corrupt cpio archive
Date: Mon, 2 Jun 2008 23:39:24 +0200
User-agent: Mutt/1.5.11 OpenPKG/CURRENT

Hello list,

It seems that an archive written in copy out mode with cpio (GNU
cpio) 2.6 is corrupt, The command used was simply:

  $ find . -depth -print | cpio -ov >backup.cpio
  [...]
  home/sharedsys/newfiles/test.ps
  home/sharedsys/newfiles
  home/sharedsys
  home/
  824190054 blocks

...just as suggested by O'Reilly:

  http://www.onlamp.com/pub/a/bsd/2002/07/11/FreeBSD_Basics.html

When restoring in copy out mode with the identical cpio(1) binary
as used for the backup:

  $ cpio -ivd <backup.cpio
  ./home/backfiles/otheruse/usr/etc/mutt/mime.types
  ./home/sharedsys
  ./$e~OÉÃ>~GðA1°~I*}J~P±\~WgÊb~RJGùoCqâÃ^BkïJÌ~X^UcbHH.;²ñ~[uÖ
  ./ÈB0)address@hidden;^]³^]çü~NåMæ~[~J^Z[~Kp~ÿð^
  ./@B~]w^Xæá³ÌÍì^D^KÃr­~H~K§h¢2:~Q_>á^Z[Ó4^Nó~O^Wò^_!~D§øÌ®

When a newer version of cpio (GNU cpio) 2.9 is used for the restore:

  $ cpio -ivd <backup.cpio
  home/backfiles/otheruse/home/parsed/segsulin.xml
  home/backfiles/otheruse/home/parsed/segsulin.tar
  cpio: premature end of file

Either way nearly all of the archive contents are not restored.

What is the suggested way out of this big mess, and how does one
usually recover from such cpio archive corruption? Should I stop
using cpio(1) for all important backups?

Thanks for the help.

Regards,
Christopher




reply via email to

[Prev in Thread] Current Thread [Next in Thread]