malcomxcia
Goto Top

Robocopy Error Levels ?

Tach'en erst mal ! ! !

Hab ein Problem mit Robocopy ! Wir kopieren bei mehreren Kunden die täglichen Backups auf eine ext. Festplatte. Wir haben trotzdem (nur bei einigen Kunden) immer mal wieder den Fehler 8,9 oder 11. Was stellen diese Errorlevels genau dar.

Z.B hab ich heut erst wieder bei nem Kunden den Errorlevel 11.

Jetzt wenn ich in der "Hilfe" von Robocopy nachschaue, steht bei Errorlevel 11 folgendes:

if errorlevel 11 echo OKCOPY + FAIL + XTRA & goto end

Da sagt mir aber eigentlich gar nicht viel aus.

WAS ? WO ? Fail !

Wäre schön wenn mir hierzu mal jemand Auskunft geben könnte ;)

Gruß und Danke schon mal im voraus
Malcom

Content-Key: 193741

Url: https://administrator.de/contentid/193741

Printed on: April 27, 2024 at 02:04 o'clock

Member: Penny.Cilin
Penny.Cilin Nov 05, 2012 updated at 12:29:37 (UTC)
Goto Top
Hallo malcomxcia,

hast Du mal bei Google nachgeschaut? Bei Beim Ressource Kit für Windows 2003 ist Robocopy XP010 und eine Dokumentation vorhanden. Dort kannst Du dann die verschiedenen Errorlevel erlesen. Also lade Dir das Ressource kit runter und extrahiere die Robocopy Dokumentation.

Wie wäre es hiermit Google-suche


Hier der Auszug aus der Dokumentation:

Soe wie es aussieht, hast Du die Kombination:
  • daß einige Dateien/Verziechnisse nicht kopiert wurden (RC8)
  • zusätzliche Dateien/Verzeichnisse auf dem Ziel
  • Es wurden Dateien ordnungsgemäß kopiert.

Return Code
The return code from Robocopy is a bit map, defined as follows:
Hex Bit Value Decimal Value Meaning If Set
0x10 16 Serious error. Robocopy did not copy any files. This is either a usage error or an error due to insufficient access privileges on the source or destination directories.
0x08 8 Some files or directories could not be copied (copy errors occurred and the retry limit was exceeded). Check these errors further.
0x04 4 Some Mismatched files or directories were detected. Examine the output log. Housekeeping is probably necessary.
0x02 2 Some Extra files or directories were detected. Examine the output log. Some housekeeping may be needed.
0x01 1 One or more files were copied successfully (that is, new files have arrived).
0x00 0 No errors occurred, and no copying was done. The source and destination directory trees are completely synchronized.

You can use this information in a batch file to report the most serious anomalies, as follows:

if errorlevel 16 echo *FATAL ERROR* & goto end
if errorlevel 8 echo FAILED COPIES & goto end
if errorlevel 4 echo *MISMATCHES* & goto end
if errorlevel 2 echo EXTRA FILES & goto end
if errorlevel 1 echo Copy successful & goto end
if errorlevel 0 echo --no change-- & goto end
:end

Alternatively, full details of the return code could be reported as follows:

if errorlevel 16 echo *FATAL ERROR* & goto end
if errorlevel 15 echo FAIL MISM XTRA COPY & goto end
if errorlevel 14 echo FAIL MISM XTRA & goto end
if errorlevel 13 echo FAIL MISM COPY & goto end
if errorlevel 12 echo FAIL MISM & goto end
if errorlevel 11 echo FAIL XTRA COPY & goto end
if errorlevel 10 echo FAIL XTRA & goto end
if errorlevel 9 echo FAIL COPY & goto end
if errorlevel 8 echo FAIL & goto end
if errorlevel 7 echo MISM XTRA COPY & goto end
if errorlevel 6 echo MISM XTRA & goto end
if errorlevel 5 echo MISM COPY & goto end
if errorlevel 4 echo MISM & goto end
if errorlevel 3 echo XTRA COPY & goto end
if errorlevel 2 echo XTRA & goto end
if errorlevel 1 echo COPY & goto end
if errorlevel 0 echo --no change-- & goto end
:end



Gruss Penny.
Member: malcomxcia
malcomxcia Nov 05, 2012 at 12:50:52 (UTC)
Goto Top
Erst mal vielen Dank für deine Antwort ;)

Ja Ok soweit war ich ja auch schon, aber wie kommst Du zu dieser Kombination ;) ?

errorlevel 11 bedeutet ja laut Beschreibung

if errorlevel 11 echo OKCOPY + FAIL + XTRA & goto end

Ja aber was bedeutet OKCOPY + FAIL + XTRA ? ? ?

Gruß und Danke nochmal
Malcom
Member: Luie86
Luie86 Nov 05, 2012 at 12:53:07 (UTC)
Goto Top
Huhu,

alternativ zu den Errorleveln, einfach die Log-Optionen im Robocopy (/LOG:<PFAD>) verwenden.
Die Protokolle liefern dann auch ein paar mehr Informationen face-wink

Gruß Daniel
Member: Penny.Cilin
Penny.Cilin Nov 05, 2012 at 13:02:24 (UTC)
Goto Top
Zitat von @malcomxcia:

Ja aber was bedeutet OKCOPY + FAIL + XTRA ? ? ?

Gruß und Danke nochmal
Malcom

Dann schau Dir mal folgenden Abschnitt an:

0x08 8 Some files or directories could not be copied (copy errors occurred and the retry limit was exceeded). Check these errors further.
0x02 2 Some Extra files or directories were detected. Examine the output log. Some housekeeping may be needed.
0x01 1 One or more files were copied successfully (that is, new files have arrived).

8 + 2 + 1 = 11.

Das heißt Du hast eine Kombination aus drei Stati. Und wie schon beschrieben, schau in das Robocopy LOG rein dort siehst Du die detaillierten Angaben.


Gruss Penny.
Member: malcomxcia
malcomxcia Nov 07, 2012 at 15:23:43 (UTC)
Goto Top
Nochmals vielen Dank für eure Tipps !

Also die log von Robocopy ist dann wirklich um einiges übersichtlicher

Gruß
Malcom
Member: Penny.Cilin
Penny.Cilin Nov 09, 2012 at 15:27:47 (UTC)
Goto Top
OK die Echo-Meldungen sind eigentlich dafür gedacht, eine 1. Rückmeldung zu bekommen.
Danach schaut man ins LOG.


Gruss Penny.