Sometimes, GHOST backup fails, possibly due to issues with files...
I wrote a program myself, TOdisk, which successfully backed up.
It backs up hard disks, partitions, or any sectors in sector mode...
Supports compression, volume splitting, extended partitions, multi-tasking, etc...
Thanks to Brother johnsonlam (Hong Kong) and Brother fastslz of the China DOS Union, and the help and support of Mr. Lizhi, the author of ddcopy, and foreigner Lucho!
Welcome to visit http://www.cn-dos.net and http://johnson.tmfc.net/dos/index.html for DOS communication
Explanation as follows:
Hard disk/partition/sector =freE=(Free) Backup/Restore ==TOdisk ==(Sector Mode)
Version: 1.3 alpha
Operating environment: MS-DOS / Win9x MS-DOS window (If UDMA driver is loaded, it may run abnormally)
TOdisk version 1.3 Alpha Copyright (C) 2006-2007 by GOTOmsdos, 2007-1-13
Email: tdaim@sina.com
Syntax:
<Execution Mode>
TOdisk Source string 1 TO Target string 1 ]]]]
<View Mode>
TOdisk |-P|]]
<Execution Mode>
Source/target string: (Hard disk string, partition string, DOS drive letter string, image file string)
1, Hard disk string >> 1 or 2...n
2, Partition string >> 1:2 or 2:3...n:n
3, DOS drive letter string >> C: or D:... Z:
4, Image file string >>
Image file parameters:
Cn - C : (compress) Compress
n : Compression level (1-9, 6 may be the best balance between strength and speed; if no level is specified, default is 6)
K - K : key Compression password, need to enter password
Vn - V : (volume) Volume splitting
n : Size of each volume in MBs (from 1 to 2047). If not specified, default is 2047
E? - E : (every) Compression password for each volume is the same as the first volume
? : Prompt for compression password for each volume
--A
When target:
(c:\image.to) <No compression, no volume splitting>
(c:\image.to=Vn) <No compression, volume splitting>
(c:\image.toz=Cn) <Compress, no password, no volume splitting>
(c:\image.toz=Cn=K) <Compress, prompt for password, no volume splitting>
(c:\image.toz=Cn=K=Vn) <Compress, prompt for password, volume splitting, only the first image file has password>
(c:\image.toz=Cn=K=Vn=E) <Compress, prompt for password, volume splitting, password for each volume is the same as the first volume>
(c:\image.toz=Cn=K=Vn=E?) <Compress, prompt for password, volume splitting, prompt for password for each volume>
Example:
(g:\image.toz=c7=k=v1000=e?)
(Note: In multi-tasking, when the image file string is the target, it can only be the last one (so there can only be one))
Example:
Legal:
1:1 TO 2:3,3:4,(g:\image.toz=c=v)
1:1,2:2,3:3 TO 2:3,3:4,(g:\image.toz=c=v)
1:1 TO 2:3,(g:\image.toz=c=v)+10000,3:4
1:1,2:2,3:3 TO 2:3,(g:\image.toz=c=v)+20000,3:4
1:1,3:4,4:4 TO 2:3,(f:\image1.toz=c=v)+30000,(g:\image2.toz=c=v)
1:1,2:2,3:3 TO 2:3,(g:\image.toz=c=v),3:4 -p
1:1,3:4,4:4 TO 2:3,(f:\image1.toz=c=v),(g:\image2.toz=c=v) -p
Illegal 1:
1:1 TO 2:3,(g:\image.toz=c=v),3:4
1:1,2:2,3:3 TO 2:3,(g:\image.toz=c=v),3:4
(Free mode, neither the last one nor specifying the number of sectors to operate <using '+'>)
Illegal 2:
1:1,3:4,4:4 TO 2:3,(f:\image1.toz=c=v),(g:\image2.toz=c=v)
(Free mode, exceeding one image file string and not specifying the number of sectors to operate for the image file string before the last one <using '+'>)
--B
When source (automatically determines whether it is compressed, so even compressed files with to suffix can be recognized as compressed files):
(c:\image.toz) <Do not automatically search for volumes>
(c:\image.toz=V) <Automatically search for volumes>
<Image file name, if not compressed, it is recommended to use to as the suffix; if compressed, it is recommended to use toz as the suffix to avoid confusion with other file names, but the program does not enforce this>
In source/target string
- : Specify the starting sector to operate
+ : Specify the number of sectors to operate
But not allowed in image file string
Example:
1-5000
1:2+5000
D:-5000+10000
(g:\image.toz)+3000
Source/target string switches:
=q : quiet Quiet (no questions)
=m : mute Silent (no information display)
=i : ignore Ignore (ignore read and write errors, but invalid for image file string)
=n : next Next (if a fatal error is encountered, continue to the next task)
Example:
1:2=q=m,3:4 TO 4:1=i=n,(file=c)=q=m
If there are - + operators in the source/target string, then
The above parameters (i, q, m, n) in the source/target string must be placed after - or +: (Of course, in the matching mode -d, -p, there should not be - + operators, so there is naturally no such problem )
Example:
1:2-300+400=q=m,3:4 TO 4:1=i=n,(file=c)+500=q=m
Global switch 1 (mode switch):
--A
(Matching mode)
-d|p Hard disk|partition Sub-mode
In the matching mode, the number of source strings and target strings must be equal. In addition, in the partition mode, if the target string is a partition, the partition ID will be updated)
-d Hard disk mode example:
1,2 TO 3,4 -d
Equivalent to two separate operations:
1 TO 3
2 TO 4
But not equivalent to
1,2 TO 3,4
Unless 1,3 have the same size, 2,4 have the same size
-p Partition mode example:
1:2,4:3,2:2 TO 2:3,(d:\back.toz=c),4:5 -p
Equivalent to three separate operations:
1:2 TO 2:3 -p
4:3 TO (d:\back.toz=c)
2:2 TO 4:5 -p
(Among them, since the first and third tasks are both partition mode and write partition <the target is a partition, not an image file>, so even in separate operations, -p must be added to indicate that the partition ID needs to be updated. )
--B
(Free mode)
No -d|p switch
In the free mode, the number of source strings and target strings is not required to be equal, and the data transmission between previous and subsequent tasks has a successive relationship)
For example:
Hard disk 1 has 1000 total sectors
Hard disk 2 has 2000 total sectors
Hard disk 3 has 1500 total sectors
Hard disk 4 has 3000 total sectors
1,2 TO 3,4
This is free mode, the process is as follows:
Task 1:
Hard disk 1 transfers to hard disk 3 1000 sectors (hard disk 1 completes the task and exits)
Task 2:
Hard disk 2 transfers to hard disk 3 1500-1000=500 sectors (hard disk 3 completes the task and exits)
Task 3:
Hard disk 2 transfers to hard disk 4 2000-500=1500 sectors (hard disk 2 completes the task and exits)
The program exits (because one of the source and target has completed)
The program handles this in consideration of flexibility: the user may not exactly know the precise sizes of various partitions and hard disks, but still wants to complete the data that has met the conditions earlier...
In the free mode, the number of source strings and target strings is not required to be equal because the data transmission between previous and subsequent tasks has a successive relationship
For example:
1 TO 2:3,3:4,4:5,(g:\file.to)
Global switch 2 :
(Located at the back end of the command line parameters, effective for all tasks):
-q|quiet : Quiet (no questions)
-m|mute : Silent (no information display)
-i|ignore : Ignore (ignore read and write errors, but invalid for image file string)
-ir|ignorereaderror : Ignore read errors
-iw|ignorewriteerror : Ignore write errors
-n|next : Next (if a fatal error is encountered, continue to the next task)
Example:
1:2,E: TO 2:3,(back.toz=c) -q -m -n -i
Overall example:
Single task:
1 TO 2
Copy hard disk 1 to hard disk 2
1-100+1000 TO 2-200
Copy from sector 100 of hard disk 1 to sector 200 of hard disk 2, copying 1000 sectors in total
1:2 TO 2:3
Copy partition 2 of hard disk 1 to partition 3 of hard disk 2
1:2-200+1000 TO 2:3-300
Copy from sector 200 of partition 2 of hard disk 1 to sector 300 of partition 3 of hard disk 2, copying 1000 sectors in total
1:2 TO (d:\backup.toz=c=k=v1000=e?)
Backup partition 2 of hard disk 1 to image file d:\backup.toz
c - Compression level 6
k - Prompt for compression password
v1000 - Volume splitting, each volume size 1000 MBs
e? - Prompt for compression password for each volume
Multi-task:
Matching mode:
1:2,(h:\image.toz=v),2:3 TO (g:\image.toz=c=v),D:,3:2 -p
Free mode:
1:2,2:3-2345,3:4 TO 3:3-1234+300,4:1+3456,(i:\image.toz=c=v1000)
<View Mode>
Warning!!!
The DOS drive letters displayed in the program's partition summary table are inferred according to the DOS drive letter allocation rules and may not be accurate, especially when additionally mounting drives such as USB drives, mobile hard disks, virtual disks, etc., and are for reference only. However, the partition numbers displayed in the table are correct.
-Dn Display information of hard disk n
-P Display information of all partitions of all hard disks
noz|nozero : Do not display partitions with partition ID 0
noh|nohidden : Do not display hidden partitions
nozh|nozerohidden : Do not display partitions with partition ID 0 and hidden partitions
fn|fatntfs : Display FAT and NTFS partitions
f|fat : Display FAT partitions
l|linux : Display LINUX partitions
n:n - 1:2 or 2:3 ...
A: - C: or D: ... Z:
Example:
-d : Display all hard disks
-d2 : Display hard disk 2
-p : Display all partitions of all hard disks
-pfn : Display FAT and NTFS partitions
-p2:3 : Display partition 3 of hard disk 2
-pc: : Display C:
*********
Supplementary Instructions
*********
This program uses sector mode:
For enterprise-level or extremely important data, sector mode should be used.
×××××××××××××××××××××
Special Suggestions:
1
This program is very suitable for backing up full partitions.
2
Because it is sector mode, it can back up partitions of any file system (including LINUX, etc.).
However, if you want to back up to an image file, the partition where the image file is located can only be FAT/FAT32.
××××××××××××××××××××××××××××××
Backbone switches:
One Matching mode (including hard disk mode (-d) and partition mode (-p))
This mode is the most commonly used, especially partition mode.
Because this mode processes format data (hard disks and partitions), to match, at least the original data block should be smaller than the target data block (in this case, if it is partition mode, in addition to updating the partition ID of the source partition and the 80/00 active flag, a total of two bytes to the target partition, currently does not support updating the size of the partition, which involves moving all subsequent partitions!, and for general users, it is used less, generally it is where it comes from and where it goes back to, playing a backup and restore role..)
Because it is a format matching mode, the - and + operators are not allowed.
In the matching mode, the number of source strings and target strings must be equal, otherwise a warning will exit
The matching mode supports image file strings.
In addition to the partition mode using the partition ID of the source partition and 80/00 to update the partition table of the target partition,
The multi-task matching mode is equivalent to the one-to-one string combination of the free mode single task without - + with the same number of strings.
Two Free mode (without -d and -p parameters)
This is a sector-precise method, which can arbitrarily specify the starting sector to be processed (prefix is -) and the number of sector operations (prefix is +, small association:
GRUB also uses + to indicate the number of data blocks (sectors) to be loaded).
For example:
1-100+200 means execute 200 sectors starting from sector 100 of hard disk 1
The image file string also supports the + operator, but not the - operator.
Technically, it can be supported, but it will mark a lot of places in the file, which will greatly reduce the speed of file reading
For example:
(e:\back=c=v100)+1000 means execute 1000 sectors in total contained in the file
The following is illegal:
(e:\back=c=v100)-1000 attempts to execute from sector 1000 of the file, but it is illegal.
This mode is very useful for RAW data recovery. That is, when all file-based data recovery tools have been used up and cannot find data, sector mode must be used..
Source/target string
Hard disk string:
1
Executed as:
Hard disk 1 starts at sector 0 and processes the total sectors of the entire hard disk
Partition string:
1:1
Executed as:
Hard disk 1 partition 1 starts at sector and processes the total sectors of partition 1
DOS drive letter string:
C:
The program finds the corresponding partition in the partition table and is equivalent to the partition string
Image file string
Must be enclosed in parentheses ()
Complete parameters are as follows:
(d:\image=c=k=v1000=e?) Connected with = sign
First is the file name (8.3 format)
Cn C(COMPRESS) Compress, 9 is the compression level, (1-9, 6 may be the best balance between strength and speed; if no level is specified, default is 6)
K (KEY), indicates that the compressed file has a password. By default, there is no password. Having K means there is a password, so when the program creates a compressed image, it will ask the user to enter a password, so that when restoring the file to the hard disk next time, the user will also be asked to enter a password, which is for security needs.
(However, only having K will require a password for the first compressed file. If there are volumes, the subsequent volumes will not require a password)
Vn V(Volume) means having volume splitting function. When saving hard disk data as volume files, the user can specify the size of each volume (in MB), n means MB, default is 2047
V1000 means 1000MB per volume
(Additional: When the file parameter is on the left, that is, in the source position, if there is no V, the program will only process one file and will not automatically search for volumes (because this may be self-righteous. If there is V, it will automatically search for its volumes, but just give this V, no need for n)
E? E (Eevry) means requiring a password for each compressed volume. If there is no ?, the program will automatically write the password of the first file (mother volume) into the subsequent volumes. If there is ? it means requiring a password for each compressed volume file and stopping to wait for the user to enter.
***********************************************
About the compression library zlib used in this program and the arduous search process
***********************************************
1
Tried simple and old versions of LZ, LZW, HUFFMAN, LZHUF, LZSS, LZHARC, LZ77, LZARI, LZRW1, etc., and they are not ideal, too old, and too inefficient, only suitable for teaching.
2
Looked at ARJ/UNARJ, has many functions I don't want.
3
Once set on GZIP (BZIP2, basically the same), it is very good, and I also think it is a bit suitable for me, with good compression ratio and speed, and compression ratio options from 1-9. I studied for a few days and found that there is no memory compression, only file compression...
4
Saw a hint: zlib supports memory compression!
Decided on it!
(ZLIB and GZIP, PNG all use the same engine: a combination of LZ77 and HUFFMAN, of course, incomparable with the ancient original version mentioned earlier)
During this process, I contacted Mr. Lizhi, the author of DDCopy. I got the source code of DDCopy, which inspired me..
However, I tried the compression of DDCopy, which is not ideal, takes a long time, and has a low compression ratio. Because the compression/decompression class it uses is relatively simple, there are only two files (using simple LZSS, the class written by Hu Yingzhuo, and later I also saw it online)
The compression engine used is the advanced latest version of the zlib-1.2.3 library (the same engine used by GZIP, PNG images)
The compression ratio and compression speed are very fast, and the decompression speed is extremely fast!
In a WIN32 console program, compressing 50MB takes about 20 seconds and compresses to 25MB.
Decompression takes only about 3 seconds! I*!
There are also compression ratio options from 1-9 (similar to GHOST)...
ZLIB compression ratio is quite high, using optimized and efficient LZ77 and HUFFMAN combination, DEFLATE method
And the speed is much faster than similar compression libraries! (If comparing compression libraries, it should be similar to GHOST in speed and compression ratio.. )
*****************************
Limitations and functions to be added of this program
*****************************
Since it is a DOS program, file parameters only support FAT series drive letters
Plan to add processing of the nth hard disk and nth partition in the specified image
***************
Several useful switches
***************
1 i|ignore (还有 ir|ignorereaderror iw|ignorewriteerror)
Ignore disk read and write errors, so that the program will not terminate due to fewer media problems.
2
q | quiet
Do not prompt, execute directly (but for things like file not opening, it will still ask for the file name.. etc.)
3 n | next
When a fatal error is found during the execution of a certain task, do not exit the entire program, continue to execute the next task (but still update the data volume of the next task according to the amount of data that has been completed in the previous one)
4 m | mute
Do not display information
The use locations of these switches:
Single letter can be used in the source/target string <only for the task of its source/target string>, and can also be used globally <effective for the global>; while two or more characters can only be used globally):
Among them, i
a
Used in hard disk/partition/DOS drive letter string: (connected with =)
For example:
1=i TO 2 (Ignore read errors of hard disk 1, but not write errors of hard disk 2)
1:1 TO 2:3=i (Ignore write errors of partition 3 of hard disk 2, but not read errors of partition 1 of hard disk 1)
e:=i TO 2:3=i (Ignore both)
But the ignore switch (-i) cannot be used in the image file string (because the file is not a device. If an error is given by DOS during reading and writing the file, it cannot be ignored, and the program will prompt you to re-enter the file name)
b
Used in the independent place behind (effective for all tasks), equivalent to -ir and -iw
For example:
1:2,E: TO 2:3,(BACK.TOZ=C) -i(也可-ir -iw) (Ignore read errors and write errors of all tasks)
q | quiet (Not using y to avoid confusion with n, to avoid users mistakenly thinking that y means no prompt and n means prompt.)
[ Last edited by GOTOmsdos on 2007-4-19 at 12:45 PM ]
I wrote a program myself, TOdisk, which successfully backed up.
It backs up hard disks, partitions, or any sectors in sector mode...
Supports compression, volume splitting, extended partitions, multi-tasking, etc...
Thanks to Brother johnsonlam (Hong Kong) and Brother fastslz of the China DOS Union, and the help and support of Mr. Lizhi, the author of ddcopy, and foreigner Lucho!
Welcome to visit http://www.cn-dos.net and http://johnson.tmfc.net/dos/index.html for DOS communication
Explanation as follows:
Hard disk/partition/sector =freE=(Free) Backup/Restore ==TOdisk ==(Sector Mode)
Version: 1.3 alpha
Operating environment: MS-DOS / Win9x MS-DOS window (If UDMA driver is loaded, it may run abnormally)
TOdisk version 1.3 Alpha Copyright (C) 2006-2007 by GOTOmsdos, 2007-1-13
Email: tdaim@sina.com
Syntax:
<Execution Mode>
TOdisk Source string 1 TO Target string 1 ]]]]
<View Mode>
TOdisk |-P|]]
<Execution Mode>
Source/target string: (Hard disk string, partition string, DOS drive letter string, image file string)
1, Hard disk string >> 1 or 2...n
2, Partition string >> 1:2 or 2:3...n:n
3, DOS drive letter string >> C: or D:... Z:
4, Image file string >>
Image file parameters:
Cn - C : (compress) Compress
n : Compression level (1-9, 6 may be the best balance between strength and speed; if no level is specified, default is 6)
K - K : key Compression password, need to enter password
Vn - V : (volume) Volume splitting
n : Size of each volume in MBs (from 1 to 2047). If not specified, default is 2047
E? - E : (every) Compression password for each volume is the same as the first volume
? : Prompt for compression password for each volume
--A
When target:
(c:\image.to) <No compression, no volume splitting>
(c:\image.to=Vn) <No compression, volume splitting>
(c:\image.toz=Cn) <Compress, no password, no volume splitting>
(c:\image.toz=Cn=K) <Compress, prompt for password, no volume splitting>
(c:\image.toz=Cn=K=Vn) <Compress, prompt for password, volume splitting, only the first image file has password>
(c:\image.toz=Cn=K=Vn=E) <Compress, prompt for password, volume splitting, password for each volume is the same as the first volume>
(c:\image.toz=Cn=K=Vn=E?) <Compress, prompt for password, volume splitting, prompt for password for each volume>
Example:
(g:\image.toz=c7=k=v1000=e?)
(Note: In multi-tasking, when the image file string is the target, it can only be the last one (so there can only be one))
Example:
Legal:
1:1 TO 2:3,3:4,(g:\image.toz=c=v)
1:1,2:2,3:3 TO 2:3,3:4,(g:\image.toz=c=v)
1:1 TO 2:3,(g:\image.toz=c=v)+10000,3:4
1:1,2:2,3:3 TO 2:3,(g:\image.toz=c=v)+20000,3:4
1:1,3:4,4:4 TO 2:3,(f:\image1.toz=c=v)+30000,(g:\image2.toz=c=v)
1:1,2:2,3:3 TO 2:3,(g:\image.toz=c=v),3:4 -p
1:1,3:4,4:4 TO 2:3,(f:\image1.toz=c=v),(g:\image2.toz=c=v) -p
Illegal 1:
1:1 TO 2:3,(g:\image.toz=c=v),3:4
1:1,2:2,3:3 TO 2:3,(g:\image.toz=c=v),3:4
(Free mode, neither the last one nor specifying the number of sectors to operate <using '+'>)
Illegal 2:
1:1,3:4,4:4 TO 2:3,(f:\image1.toz=c=v),(g:\image2.toz=c=v)
(Free mode, exceeding one image file string and not specifying the number of sectors to operate for the image file string before the last one <using '+'>)
--B
When source (automatically determines whether it is compressed, so even compressed files with to suffix can be recognized as compressed files):
(c:\image.toz) <Do not automatically search for volumes>
(c:\image.toz=V) <Automatically search for volumes>
<Image file name, if not compressed, it is recommended to use to as the suffix; if compressed, it is recommended to use toz as the suffix to avoid confusion with other file names, but the program does not enforce this>
In source/target string
- : Specify the starting sector to operate
+ : Specify the number of sectors to operate
But not allowed in image file string
Example:
1-5000
1:2+5000
D:-5000+10000
(g:\image.toz)+3000
Source/target string switches:
=q : quiet Quiet (no questions)
=m : mute Silent (no information display)
=i : ignore Ignore (ignore read and write errors, but invalid for image file string)
=n : next Next (if a fatal error is encountered, continue to the next task)
Example:
1:2=q=m,3:4 TO 4:1=i=n,(file=c)=q=m
If there are - + operators in the source/target string, then
The above parameters (i, q, m, n) in the source/target string must be placed after - or +: (Of course, in the matching mode -d, -p, there should not be - + operators, so there is naturally no such problem )
Example:
1:2-300+400=q=m,3:4 TO 4:1=i=n,(file=c)+500=q=m
Global switch 1 (mode switch):
--A
(Matching mode)
-d|p Hard disk|partition Sub-mode
In the matching mode, the number of source strings and target strings must be equal. In addition, in the partition mode, if the target string is a partition, the partition ID will be updated)
-d Hard disk mode example:
1,2 TO 3,4 -d
Equivalent to two separate operations:
1 TO 3
2 TO 4
But not equivalent to
1,2 TO 3,4
Unless 1,3 have the same size, 2,4 have the same size
-p Partition mode example:
1:2,4:3,2:2 TO 2:3,(d:\back.toz=c),4:5 -p
Equivalent to three separate operations:
1:2 TO 2:3 -p
4:3 TO (d:\back.toz=c)
2:2 TO 4:5 -p
(Among them, since the first and third tasks are both partition mode and write partition <the target is a partition, not an image file>, so even in separate operations, -p must be added to indicate that the partition ID needs to be updated. )
--B
(Free mode)
No -d|p switch
In the free mode, the number of source strings and target strings is not required to be equal, and the data transmission between previous and subsequent tasks has a successive relationship)
For example:
Hard disk 1 has 1000 total sectors
Hard disk 2 has 2000 total sectors
Hard disk 3 has 1500 total sectors
Hard disk 4 has 3000 total sectors
1,2 TO 3,4
This is free mode, the process is as follows:
Task 1:
Hard disk 1 transfers to hard disk 3 1000 sectors (hard disk 1 completes the task and exits)
Task 2:
Hard disk 2 transfers to hard disk 3 1500-1000=500 sectors (hard disk 3 completes the task and exits)
Task 3:
Hard disk 2 transfers to hard disk 4 2000-500=1500 sectors (hard disk 2 completes the task and exits)
The program exits (because one of the source and target has completed)
The program handles this in consideration of flexibility: the user may not exactly know the precise sizes of various partitions and hard disks, but still wants to complete the data that has met the conditions earlier...
In the free mode, the number of source strings and target strings is not required to be equal because the data transmission between previous and subsequent tasks has a successive relationship
For example:
1 TO 2:3,3:4,4:5,(g:\file.to)
Global switch 2 :
(Located at the back end of the command line parameters, effective for all tasks):
-q|quiet : Quiet (no questions)
-m|mute : Silent (no information display)
-i|ignore : Ignore (ignore read and write errors, but invalid for image file string)
-ir|ignorereaderror : Ignore read errors
-iw|ignorewriteerror : Ignore write errors
-n|next : Next (if a fatal error is encountered, continue to the next task)
Example:
1:2,E: TO 2:3,(back.toz=c) -q -m -n -i
Overall example:
Single task:
1 TO 2
Copy hard disk 1 to hard disk 2
1-100+1000 TO 2-200
Copy from sector 100 of hard disk 1 to sector 200 of hard disk 2, copying 1000 sectors in total
1:2 TO 2:3
Copy partition 2 of hard disk 1 to partition 3 of hard disk 2
1:2-200+1000 TO 2:3-300
Copy from sector 200 of partition 2 of hard disk 1 to sector 300 of partition 3 of hard disk 2, copying 1000 sectors in total
1:2 TO (d:\backup.toz=c=k=v1000=e?)
Backup partition 2 of hard disk 1 to image file d:\backup.toz
c - Compression level 6
k - Prompt for compression password
v1000 - Volume splitting, each volume size 1000 MBs
e? - Prompt for compression password for each volume
Multi-task:
Matching mode:
1:2,(h:\image.toz=v),2:3 TO (g:\image.toz=c=v),D:,3:2 -p
Free mode:
1:2,2:3-2345,3:4 TO 3:3-1234+300,4:1+3456,(i:\image.toz=c=v1000)
<View Mode>
Warning!!!
The DOS drive letters displayed in the program's partition summary table are inferred according to the DOS drive letter allocation rules and may not be accurate, especially when additionally mounting drives such as USB drives, mobile hard disks, virtual disks, etc., and are for reference only. However, the partition numbers displayed in the table are correct.
-Dn Display information of hard disk n
-P Display information of all partitions of all hard disks
noz|nozero : Do not display partitions with partition ID 0
noh|nohidden : Do not display hidden partitions
nozh|nozerohidden : Do not display partitions with partition ID 0 and hidden partitions
fn|fatntfs : Display FAT and NTFS partitions
f|fat : Display FAT partitions
l|linux : Display LINUX partitions
n:n - 1:2 or 2:3 ...
A: - C: or D: ... Z:
Example:
-d : Display all hard disks
-d2 : Display hard disk 2
-p : Display all partitions of all hard disks
-pfn : Display FAT and NTFS partitions
-p2:3 : Display partition 3 of hard disk 2
-pc: : Display C:
*********
Supplementary Instructions
*********
This program uses sector mode:
For enterprise-level or extremely important data, sector mode should be used.
×××××××××××××××××××××
Special Suggestions:
1
This program is very suitable for backing up full partitions.
2
Because it is sector mode, it can back up partitions of any file system (including LINUX, etc.).
However, if you want to back up to an image file, the partition where the image file is located can only be FAT/FAT32.
××××××××××××××××××××××××××××××
Backbone switches:
One Matching mode (including hard disk mode (-d) and partition mode (-p))
This mode is the most commonly used, especially partition mode.
Because this mode processes format data (hard disks and partitions), to match, at least the original data block should be smaller than the target data block (in this case, if it is partition mode, in addition to updating the partition ID of the source partition and the 80/00 active flag, a total of two bytes to the target partition, currently does not support updating the size of the partition, which involves moving all subsequent partitions!, and for general users, it is used less, generally it is where it comes from and where it goes back to, playing a backup and restore role..)
Because it is a format matching mode, the - and + operators are not allowed.
In the matching mode, the number of source strings and target strings must be equal, otherwise a warning will exit
The matching mode supports image file strings.
In addition to the partition mode using the partition ID of the source partition and 80/00 to update the partition table of the target partition,
The multi-task matching mode is equivalent to the one-to-one string combination of the free mode single task without - + with the same number of strings.
Two Free mode (without -d and -p parameters)
This is a sector-precise method, which can arbitrarily specify the starting sector to be processed (prefix is -) and the number of sector operations (prefix is +, small association:
GRUB also uses + to indicate the number of data blocks (sectors) to be loaded).
For example:
1-100+200 means execute 200 sectors starting from sector 100 of hard disk 1
The image file string also supports the + operator, but not the - operator.
Technically, it can be supported, but it will mark a lot of places in the file, which will greatly reduce the speed of file reading
For example:
(e:\back=c=v100)+1000 means execute 1000 sectors in total contained in the file
The following is illegal:
(e:\back=c=v100)-1000 attempts to execute from sector 1000 of the file, but it is illegal.
This mode is very useful for RAW data recovery. That is, when all file-based data recovery tools have been used up and cannot find data, sector mode must be used..
Source/target string
Hard disk string:
1
Executed as:
Hard disk 1 starts at sector 0 and processes the total sectors of the entire hard disk
Partition string:
1:1
Executed as:
Hard disk 1 partition 1 starts at sector and processes the total sectors of partition 1
DOS drive letter string:
C:
The program finds the corresponding partition in the partition table and is equivalent to the partition string
Image file string
Must be enclosed in parentheses ()
Complete parameters are as follows:
(d:\image=c=k=v1000=e?) Connected with = sign
First is the file name (8.3 format)
Cn C(COMPRESS) Compress, 9 is the compression level, (1-9, 6 may be the best balance between strength and speed; if no level is specified, default is 6)
K (KEY), indicates that the compressed file has a password. By default, there is no password. Having K means there is a password, so when the program creates a compressed image, it will ask the user to enter a password, so that when restoring the file to the hard disk next time, the user will also be asked to enter a password, which is for security needs.
(However, only having K will require a password for the first compressed file. If there are volumes, the subsequent volumes will not require a password)
Vn V(Volume) means having volume splitting function. When saving hard disk data as volume files, the user can specify the size of each volume (in MB), n means MB, default is 2047
V1000 means 1000MB per volume
(Additional: When the file parameter is on the left, that is, in the source position, if there is no V, the program will only process one file and will not automatically search for volumes (because this may be self-righteous. If there is V, it will automatically search for its volumes, but just give this V, no need for n)
E? E (Eevry) means requiring a password for each compressed volume. If there is no ?, the program will automatically write the password of the first file (mother volume) into the subsequent volumes. If there is ? it means requiring a password for each compressed volume file and stopping to wait for the user to enter.
***********************************************
About the compression library zlib used in this program and the arduous search process
***********************************************
1
Tried simple and old versions of LZ, LZW, HUFFMAN, LZHUF, LZSS, LZHARC, LZ77, LZARI, LZRW1, etc., and they are not ideal, too old, and too inefficient, only suitable for teaching.
2
Looked at ARJ/UNARJ, has many functions I don't want.
3
Once set on GZIP (BZIP2, basically the same), it is very good, and I also think it is a bit suitable for me, with good compression ratio and speed, and compression ratio options from 1-9. I studied for a few days and found that there is no memory compression, only file compression...
4
Saw a hint: zlib supports memory compression!
Decided on it!
(ZLIB and GZIP, PNG all use the same engine: a combination of LZ77 and HUFFMAN, of course, incomparable with the ancient original version mentioned earlier)
During this process, I contacted Mr. Lizhi, the author of DDCopy. I got the source code of DDCopy, which inspired me..
However, I tried the compression of DDCopy, which is not ideal, takes a long time, and has a low compression ratio. Because the compression/decompression class it uses is relatively simple, there are only two files (using simple LZSS, the class written by Hu Yingzhuo, and later I also saw it online)
The compression engine used is the advanced latest version of the zlib-1.2.3 library (the same engine used by GZIP, PNG images)
The compression ratio and compression speed are very fast, and the decompression speed is extremely fast!
In a WIN32 console program, compressing 50MB takes about 20 seconds and compresses to 25MB.
Decompression takes only about 3 seconds! I*!
There are also compression ratio options from 1-9 (similar to GHOST)...
ZLIB compression ratio is quite high, using optimized and efficient LZ77 and HUFFMAN combination, DEFLATE method
And the speed is much faster than similar compression libraries! (If comparing compression libraries, it should be similar to GHOST in speed and compression ratio.. )
*****************************
Limitations and functions to be added of this program
*****************************
Since it is a DOS program, file parameters only support FAT series drive letters
Plan to add processing of the nth hard disk and nth partition in the specified image
***************
Several useful switches
***************
1 i|ignore (还有 ir|ignorereaderror iw|ignorewriteerror)
Ignore disk read and write errors, so that the program will not terminate due to fewer media problems.
2
q | quiet
Do not prompt, execute directly (but for things like file not opening, it will still ask for the file name.. etc.)
3 n | next
When a fatal error is found during the execution of a certain task, do not exit the entire program, continue to execute the next task (but still update the data volume of the next task according to the amount of data that has been completed in the previous one)
4 m | mute
Do not display information
The use locations of these switches:
Single letter can be used in the source/target string <only for the task of its source/target string>, and can also be used globally <effective for the global>; while two or more characters can only be used globally):
Among them, i
a
Used in hard disk/partition/DOS drive letter string: (connected with =)
For example:
1=i TO 2 (Ignore read errors of hard disk 1, but not write errors of hard disk 2)
1:1 TO 2:3=i (Ignore write errors of partition 3 of hard disk 2, but not read errors of partition 1 of hard disk 1)
e:=i TO 2:3=i (Ignore both)
But the ignore switch (-i) cannot be used in the image file string (because the file is not a device. If an error is given by DOS during reading and writing the file, it cannot be ignored, and the program will prompt you to re-enter the file name)
b
Used in the independent place behind (effective for all tasks), equivalent to -ir and -iw
For example:
1:2,E: TO 2:3,(BACK.TOZ=C) -i(也可-ir -iw) (Ignore read errors and write errors of all tasks)
q | quiet (Not using y to avoid confusion with n, to avoid users mistakenly thinking that y means no prompt and n means prompt.)
[ Last edited by GOTOmsdos on 2007-4-19 at 12:45 PM ]
Attachments



