Create checksum file on the fly with Copy (VerifyCopy ; Prüfsumme speichern)

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
TomegooH
Junior Member
Junior Member
Posts: 5
Joined: 2023-07-03, 17:03 UTC

Create checksum file on the fly with Copy (VerifyCopy ; Prüfsumme speichern)

Post by *TomegooH »

Edited and moved by moderator:

Suggestion: new options for the Copy-Dialog:

VerifyCopy=0 ;no verification at all
verifyCopy=1 ;verification as now (copy & verify)
VerifyCopy=2 ;Store checksum from source as file AND verify (copy & store & verify)
VerifyCopy=3 ;Store checksum from source as file w/o verifying (copy & store)







Prüfsummen beim Kopieren automatisch speichern (VerifyCopy)



Total Commander ist für mich immer wieder eine zuverlässige Erleichterung für viele Abläufe am PC.
Insbesondere Backups und Synchronisierungen lassen sich einfach in den Griff kriegen.
Seitdem es die Möglichkeiten der Püfsummenbildung gibt benutze ich auch diese.

Meistens sind meine Backups zur Archivierung allerdings recht groß obwohl sie nur aus wenigen (.VHDX) Dateien umfassen.
Auf Grund des Inhaltes (virtuelle Maschinen, Datenbanken) ist wichtig das kopierte Dateien exakt stimmen (klar).
Da diese Dateien evtl. lange lagern bis man sie evtl. benutzt, ist die Übereinstimmung mit einer Prüfsumme überprüfbar.
Alles easy und kein Problem für TC.

Allerdings auf Grund der Datenmengen meistens langwierig. Das habe ich schon länger versucht zu optimieren.

Evtl. habe ich etwas übersehen bei der Benutzung von TC ( wäre schön ) aber durch die Größe und damit die Zeit die so ein Backup braucht ist es meistens etwas umständlich das Backup und die Berechnung der Prüfsumme ( danach ) separat anzustossen. Außerdem macht es Sinn (um die Zeit für die verifizierung zu sparen) die Prüfsummendatei zwar auf dem Zieldatenträger aber von den Quelldateien zu erstellen.
Schön und nützlich wäre wenn man beim kopieren eine Option hätte, die gleich diese Prüfsumme mit erstellt und in eine Datei am Ziel schreibt.
Evtl. ist das schneller als zwei Vorgänge und technisch ( imho ) evtl. auch relativ einfach zu realisieren. Daten werden ja schon gelesen und geschrieben.
Wenn ich das richtig beobachtet habe macht die jetzige Verifizierung nichts anderes. Jede Datei wird nach dem schreiben nochmals vom Ziel gelesen. Nur wird die Prüfsumme nirgends gespeichert. Das ist schade. Wenn man aus dieser Option zwei macht
1. Verifizierungsdatei anlegen
2. Sofort nach kopieren verifizieren. (a) Für jede Datei oder b) nach dem gesamten Kopiervorgang)
wäre das eigentliche kopieren schneller (ohne Punkt 2) und man hätte trotzdem die Möglichkeit die Daten (auch später) zu verifizieren.

Es geht mir nicht nur darum nur den Kopiervorgang zu verifizieren.
Das ist NICHT die Intension meiner Anfrage. Wichtig ist mir, das man zum Zeitpunkt der tatsächlichen Benutzung der archivierten Datei (später, viel später), sicher sein kann, das die Datei mit der ursprünglichen Datei 100% identisch ist.
Also auch einzelne schwache Bytes defekter Datenträger ausschließen kann!

Vielleicht lässt sich ja schon in der aktuellen Version machbar.

Ich danke euch fürs lesen und die etwaige Hinweise.

Thomas
User avatar
Dalai
Power Member
Power Member
Posts: 9393
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Prüfsummenbildung

Post by *Dalai »

TomegooH wrote: 2023-07-03, 18:36 UTCVielleicht lässt sich ja schon in der aktuellen Version machbar.
Nein, ist es nicht. Jedenfalls nicht mit TC-Bordmitteln. Es gab in der Vergangenheit schon mehrfach Wünsche in diese Richtung.

Grüße
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Stefan2
Power Member
Power Member
Posts: 4159
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Prüfsummenbildung

Post by *Stefan2 »

Hallo Thomas, was ist den der Kern deiner Frage?

Das hättest du gerne etwas mehr hervorheben können.

TomegooH wrote: 2023-07-03, 18:36 UTC Es geht mir nicht nur darum nur den Kopiervorgang zu verifizieren. Das ist NICHT die Intension meiner Anfrage.

Wichtig ist mir, das man zum Zeitpunkt der tatsächlichen Benutzung der archivierten Datei (später, viel später), sicher sein kann, das die Datei mit der ursprünglichen Datei 100% identisch ist.

Also auch einzelne schwache Bytes defekter Datenträger ausschließen kann!


Für deinen Zweck der Dokumentation der Prüfsummen, verwende "Dateien > Erzeuge Prüfsummen"

Die so erstellten neuen Dateien mit der/den Prüfsummen kannst du
zu den archivierten Datei(en) dazu legen und so später noch nach Jahren zur Verifizierung verwenden.




Wenn du das automatisieren möchtest, kannst du das mittels eines standalone Prüfsummen-Tools und eines Skriptes erledigen.
Der TC unterstützt dich dabei mit seinen "%F"- und "%L"-Parameters.
Im Skript wird dann für jede Datei eine Prüfsumme erstellt (und gesichert),
die Datei (ins Target "%T") kopiert, und auf Wunsch dort nochmals gegengecheckt.


"Wir" verwenden dazu gerne FSUM von SlavaSoft :D , siehe zB:
viewtopic.php?t=41066

Oder hashutils von hashcheck
viewtopic.php?t=45710

oder, oder, oder....

 
User avatar
Stefan2
Power Member
Power Member
Posts: 4159
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Prüfsummenbildung

Post by *Stefan2 »

Ich habe noch diesen Satz entdeckt:

TomegooH wrote: 2023-07-03, 18:36 UTC
Schön und nützlich wäre wenn man beim kopieren eine Option hätte, die gleich diese Prüfsumme mit erstellt und in eine Datei am Ziel schreibt.

Beim Kopieren kann man die Option "[x]Verifiziere" anhaken, dabei wird die neu erzeugte Datei verifiziert, aber die Prüfsumme wird nicht gespeichert.



Stimmt, das automatische Speichern der Prüfsumme fehlt noch, jedenfalls habe ich in der Hilfe dazu nichts entdeckt.

Nur das hier:
VerifyCopy=0 Verifiziere Dateien nach dem Kopieren, unterstützt alle Kopiermethoden außer der Explorer-Methode



Dein Wunsch wäre also zB
VerifyCopy=2 Verifiziere Dateien nach dem Kopieren und erstelle im Ziel eine Prüfsummendatei

?




 
TomegooH
Junior Member
Junior Member
Posts: 5
Joined: 2023-07-03, 17:03 UTC

Re: Prüfsummenbildung beim Kopieren automatisch Speichern?

Post by *TomegooH »

Danke für die Hinweise.

Um den Kern meiner Frage noch einmal klar zu machen ein konkretes Beispiel.

Ein 700GB großes virtuelles Laufwerk braucht zum kopieren im Netzwerk (GBit) ca 2 Stunden.
Zum erstellen der Prüfsummen noch einmal das gleiche.

Meine Überlegung war ob man das nicht in einem Aufwasch erledigen kann und so die 2 Stunden für die separate Prüfsummenberechnung sparen kann.
Bei größerem Umfang und/oder mehreren Dateien natürlich entsprechend länger.

Der Hinweis mit dem Skript, das man das zusammen erledigen kann werde ich mal anschauen.
Hört sich interessant an und wäre im Moment auf jeden Falle nützlich um das ganze in einem Rutsch zu erledigen.
Im Moment habe ich das immer händisch erledigt, was aber nervig ist.
TomegooH
Junior Member
Junior Member
Posts: 5
Joined: 2023-07-03, 17:03 UTC

Re: Prüfsummenbildung beim Kopieren automatisch Speichern?

Post by *TomegooH »

Und auch zu den Schaltern etwas

Ich würde folgende Möglichkeiten zur Programmsteuerung wünschen.
VerifyCopy=0 ;keine Überprüfung
verifyCopy=1 ;Überprüfung wie jetzt
VerifyCopy=2 ;Prüfsumme aus Quelle in Datei ablegen und gleich mit Ziel prüfen.
VerifyCopy=3 ;Nur Prüfsumme aus Quelle in Datei am Ziel ablegen keine Prüfung.

Der Grund warum ich noch einmal zwischen 2 und 3 unterscheiden würde, liegt am Zeitaufwand bei größeren Datenmengen.
Natürlich muß man, um die Datei zu überprüfen diese noch einmal, mit entsprechendem Zeitaufwand, am Ziel lesen.
Ob und wann dies geschieht kann der Benutzer riskieren/entscheiden.

Fall 2
entspricht Fall 1 nur das die Prüfsummendaten gespeichert werden.

Fall 3
Man hat die informationen über die Datenkonsistenz gespeichert und kann diese im Bedarfsfalle überprüfen.
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: Create checksum file on the fly with Copy (VerifyCopy ; Prüfsumme speichern)

Post by *JOUBE »

I'll continue writing in english because the thread has now ended up in the Suggestions Forum.

I think this concept is crap. For many reasons.

- Verifying is - as far as I know - a comparison byte by byte. No checksum is generated.
- It would then have to be specified separately which method should be used to create the checksum.
- If there are many files, there will be many checksum files. That's crap. You then have to be able to configure it in addition, by directory... etc
- And above all: There is the sentence of the self-fulfilling prophecy: If something is wrong with the network or the target, it can happen with this procedure that checksums are generated that are wrong.

It is much better and also much faster to generate a checksum file (according to your own precisely definable criteria: hash, file-by-file, etc.) on the source itself and on the target itself. If someone says the target is a NAS, that doesn't work... Yes, for example Synology: the file manager within DSM can generate MD5 checks. But It is a little bit better to log in to the NAS via ssh and generate a checksum via sha256sum, for example. The result of this procedure: you only compare the checksum files, the verification procedure of copying module of Tc can be omitted completely.

Joube
TomegooH
Junior Member
Junior Member
Posts: 5
Joined: 2023-07-03, 17:03 UTC

Re: Create checksum file on the fly with Copy (VerifyCopy ; Prüfsumme speichern)

Post by *TomegooH »

The intension of my suggestion is to optimize the workflow of archiving different virtuell machine or/and general *.vhdx files.
In my case i have to archive several Virtuel machine folders from different local PC to a NAS in a variable time schedule.

Those are mostly pretty big but only few files, which are time consuming to backup. To be sure the structure of the files are later correct and executable i therefor generate checksums of the source and store this manualy with the backup copy. This is just a precaution for later (maybe in some years) in case there are problems in execution of those files. In case of problems i can exclude data errors on the VM.
Everything works fine with TC.

The only thing i miss, is some kind of automation because i have to start the checksum calculation on the source after some hours of the backup manualy and copy the checksum file to the target folder. And this before somebody opened the file and changed the content thereby.
Maybe this could be easy done with a prepared action/script or something similar. ( I'm not an TC power user )
The checksum procedure take in the moment the same time for calculation because the source file has to be read again and block the source machine doing something different.

But on the other side the source file(s) are already read from the source while copying.
My thought was just to optimize the time consumption in this way, to generate the checksum on the fly while copying.
Case 3 of my suggestion is for the case the backup has to be finished as fast as possible on the source device. When the backup/checksum process is done, the validation on the target could be done anytime, even with an other calculation device/computer from the NAS backuped files.

Hope my explanation changes my rank from crapy to realistic :-)

Thomas
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Create checksum file on the fly with Copy (VerifyCopy ; Prüfsumme speichern)

Post by *Usher »

1.
JOUBE wrote: 2023-07-04, 10:59 UTC - Verifying is - as far as I know - a comparison byte by byte. No checksum is generated.
No, it's not, see help and @ghisler comments:
TC Help wrote:With the option Verify enabled, Total Commander reads the copied file again after copying finishes, and compares its MD5 checksum with the original. The disk cache will be bypassed.
ghisler(Author) wrote: 2022-06-01, 16:08 UTC I plan to use blake3 for the verify option when copying, and for the duplicate file finder.
A direct file comparison is used for Files > Compare by content and for Commands > Synchronize Dirs

2.
JOUBE wrote: 2023-07-04, 10:59 UTC - It would then have to be specified separately which method should be used to create the checksum.
- If there are many files, there will be many checksum files. That's crap. You then have to be able to configure it in addition, by directory... etc
It's enough to change existing copy option from

Code: Select all

[v] Verify
to

Code: Select all

[v] Verify [...]
where [...] button calls configuration dialog from Files > Create checksum files.

However, there are other problems with saving checksums:
1. Users may want to save checksum to the source drive, target drive or both. In this case additional options are needed in a dialog window.
2. The source drive may be read-only (CD/DVD/BD) or without write permission granted. That's why users may prefer to select the target drive for saving.
3. There may be problem with space available on the drive selected for checksum file saving, especially when there are thousands of files copied. There may be many megabytes of free space for saving needed.
Andrzej P. Wozniak
Polish subforum moderator
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: Create checksum file on the fly with Copy (VerifyCopy ; Prüfsumme speichern)

Post by *JOUBE »

TomegooH wrote: 2023-07-19, 23:26 UTC...checksums of the source...
Aha, that is of course something different than checking whether the file has arrived correctly at the destination. If the source drive is a SSD, I don't see a problem in running copy and local checksum building on the source at the same time with the in the moment given modules of Tc, because copying to the NAS into the net usually doesn't tie up all of the local system's resources. With a normal HDD, however, this unfortunately slows down because of the head movements and puts a lot of strain on the HDD.

In your case, local concurrent checksumming would be nice to have.

In the case of checking whether the error-free copying to the NAS was successful, my original assessment remains of course: Checksuming the target via the source is always a "self-fulfilling prophecy".

JOUBE
Post Reply