Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
tutoriel:reparer_une_archive_corrompue [Le 09/11/2011, 00:36] – [Utilisation] ph3nix_ | tutoriel:reparer_une_archive_corrompue [Le 15/12/2011, 15:17] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | {{tag> | ||
+ | ---- | ||
+ | |||
+ | ======Comment réparer une archive corrompue====== | ||
+ | =====Dans quel cas utiliser ce tutoriel ?===== | ||
+ | |||
+ | Vous voulez [[: | ||
+ | < | ||
+ | bzip2: Data integrity error when decompressing. | ||
+ | Input file = (stdin), output file = (stdout) | ||
+ | |||
+ | It is possible that the compressed file(s) have become corrupted. | ||
+ | You can use the -tvv option to test integrity of such files. | ||
+ | |||
+ | You can use the `bzip2recover' | ||
+ | data from undamaged sections of corrupted files. | ||
+ | |||
+ | tar: 56 garbage bytes ignored at end of archive | ||
+ | tar: Unexpected EOF in archive | ||
+ | tar: Unexpected EOF in archive | ||
+ | tar: Error is not recoverable: | ||
+ | </ | ||
+ | |||
+ | Et bien vous n'avez vraiment pas de chance ! Votre archive est certainement corrompue. | ||
+ | =====Solution pour une archive compressée tar.bz2===== | ||
+ | |||
+ | Avec le gestionnaire d' | ||
+ | |||
+ | Pour récupérer la suite, tapez : | ||
+ | < | ||
+ | bzip2recover nomdelarchive.tar.bz2 | ||
+ | </ | ||
+ | Vous obtiendrez une multitude de fichier (de l' | ||
+ | Ces fichiers se nomment rec00001nomdelarchive.tar et ainsi de suite. | ||
+ | |||
+ | Ensuite il faut tester chacun des fichiers, pour cela tapez : | ||
+ | < | ||
+ | Si vous avez un retour " | ||
+ | si cela est encore trop long, envisagez la commande xargs. | ||
+ | |||
+ | Vous allez obtenir le nom du fichier corrompu (ex rec003776nomdelarchive.tar). | ||
+ | Déplacez ce fichier ainsi que ceux situés avant pour n' | ||
+ | |||
+ | Ensuite, reconstruisez la suite des fichiers en tapant : | ||
+ | < | ||
+ | cat rec0* > findelarchvie.tar | ||
+ | </ | ||
+ | |||
+ | Récupérez le script ici : | ||
+ | http:// | ||
+ | qui permet de retrouver les marques d' | ||
+ | < | ||
+ | perl find_tar_headers.pl findelarchive.tar | ||
+ | </ | ||
+ | Une fois lancé, vous pouvez l' | ||
+ | < | ||
+ | findelarchive.tar: | ||
+ | findelarchive.tar: | ||
+ | findelarchive.tar: | ||
+ | findelarchive.tar: | ||
+ | </ | ||
+ | Le nombre à repérer est celui de la première ligne, dans ce cas il s'agit de 17185. | ||
+ | |||
+ | Reconstruisez correctement l' | ||
+ | < | ||
+ | tail -c +17185 findelarchive.tar > bonnearchive.tar | ||
+ | </ | ||
+ | Évidemment, | ||
+ | |||
+ | Voilà vous n'avez plus qu'à [[: | ||
+ | |||
+ | =====Solution pour une archive compressée TGZ (avec Gzip Recovery Tool)===== | ||
+ | |||
+ | Gzip Recovery Tool est un outil en ligne de commande qui permet de restaurer une archive corrompue TGZ (tar.gz). | ||
+ | |||
+ | ==== Installation ==== | ||
+ | |||
+ | * Via les dépôts: installer le paquet **[[apt> | ||
+ | * Manuellement (en passant par le site de l' | ||
+ | |||
+ | ==== Utilisation ==== | ||
+ | |||
+ | Lancer la commande suivante pour débuter la restauration: | ||
+ | < | ||
+ | gzrecover / | ||
+ | </ | ||
+ | |||
+ | Une archive avec l' | ||
+ | |||
+ | Une fois l' | ||
+ | < | ||
+ | cpio -F mon-archive-tar-corrompue.tar.recovered -i -v | ||
+ | </ | ||
+ | =====Voir aussi===== | ||
+ | *[[: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | (inspiré de cet article http:// |