ODIN 
Purpose: 
ODIN is a program to backup and restore hard disk partitions. It operates on low level and directly reads or writes the blocks of a disk volume. In this way the complete contents of a drive can be saved to single file. So you can for example backup a partition of a Windows installation including all the installed programs. Be careful: When restoring a backup image to the hard disk the complete disk contents gets erased. Be sure to select the correct image file and to choose the correct target partition. 

An image can only be restored to a partition of exactly the same size as the original partition. ODIN will allow you to restore to a bigger partition but this may result in a corrupt file system. Sometimes you may be able to repair this using tools like chkdsk, sometimes it may be unusable. 


Usage: 
ODIN comes in two flavors. You can either use the graphical user interface or the command line interface. If you start ODIN.exe without any parameters on the command line the main window opens. If you want to use a command line interface in a console application you start ODINC.exe. The required parameters and possible actions are described in the usage section. 

Backup a partition: 
Select a volume in the list box and click the Backup radio button on the top. Select a destination path in the lower box and check that the target volume has enough space left to store the complete contents of the source drive. You may enter a comment in the text box below that allows you later to identify for which purpose the image was created. 

Restore a partition: 
Select a volume in the list box and click the Restore radio button on the top. Select a path in the lower box. The volume in the upper box will be the target volume that the image will be copied to. After changing the keyboard focus the text box below the image file will display the comment that was created for this image. The target volume should have the same size as the original volume and must not be smaller. 

Verify 
Select a file in the lower list box and click the Verify button on the side. The verify process will read the complete contents of the image file and check that it contains the same contents as at the time the image was created. If parts of the image file have been manipulated or got modified you will receive an error message. After a backup of a volume you can ensure in this way that the file was written accurately. You can perform a verify at any time after the image was written. 

Disk and Volume Backups 
If an image of a single volume or a disk with all blocks is created only a single file is created with the extension .img. If a disk with only used blocks option is created ODIN will produce a file with an .mbr extension plus a .img file for every partition of the disk with the -PartionX.img extension to the provided file name. This set of created files must always be kept together, the .mbr file is not sufficient. The .mbr file contains the master boot record plus the partition information of the disk. You can restore an indvidual partition by selecting a target partition and restore the corresponding .img file from the file set. To restore the complete disk select the .mbr file from the file system and the appopriate disk in the list of available partitions (indicated by label: Entire Disk). 

Restrictions: 
During a backup operation no file activity must be performed on the volume. If write operations occur during the backup operation use the Snapshot option for backup. Backing up or restoring large images may take several hours of operation. 

You must have admin privileges to run ODIN. In Windows Vista the user account control screen will appear after start. 

Aborting a process 
By pressing the Cancel button you can abort any running operation. When aborting a restore operation the target drive will be in an unusable state so that you will need to reformat it before you can use it again. 

Options 
When creating a backup image there exist various settings how an image will be created. 

Disk Options 
You can copy all blocks of a disk volume or only the blocks that are currently in use by the file system. Used blocks only can only be backuped if the file system is known, if the volume is mounted and the file system is not corrupted. Normally you should only backup used blocks if the option is available. Save all blocks for example if you want to make a backup of a damaged file system before trying repair attempts. 

Snapshot Function 
A snapshot of a volume or disk is a functionality to freeze the current state of a medium and make the backup from the snaphshot while the operating system or running applications can still read and write files during the backup. This allows for example to backup the Windows system partition while Windows is running. Another example might be a database. This functionality requires the VSS (Volume Shadow Copy Service) being running. For more details refer to the Microsoft documentation of the VSS service. If the VSS is not available this option is greyed out. The VSS is also not available if a 32-Bit application runs under 64-Bit operating system. Using snapshots can significantly lower the performance of the backup operation. 

Compression Options 
The blocks that are backuped can be compressed. Compression can save disk space. The amount of saved space highly depends on the data that are stored on the file system. If it contains programs (.exe, .dll files) or text and office files the compression will be efficient. If the volume contains files that are already compressed like multimedia files (videos, MP3, JPEGs) you will not benefit from a compression of the backup image. You can choose between the gzip and the bzip2 compression algorithm. gzip is faster and bzip2 typically achieves a slightly better compression ratio. 

File Size 
You can specify a maximum file size for a backup image. If the backup image exceeds the given file size the image file will be split and the file names are appended with a sequence number. This is useful for example if you later want to save the files to CDs or DVDs. 

Usage of the command line interface: 
The command line interface consists of an operation a source and target plus options. Operations are list, backup, restore or verify. Source and targets are (depending on the operation) either file names or device names. Device names always start with a \Device prefix. If a file name or path contains spaces enclose it in double quotes. You can avoid typing the lengthy device names by providing an index instead of a device name. An index is just a number (0..n). How index numbers are mapping to device names can be seen using the -list command (no parameters). For the list of available options see the command -usage (no parameters). The -force options suppresses all security confirmations. This is an extremely dangerous option, you can erase complete hard disks without any warnings in this case. The intended use is for using ODIN in batch scripts that run in unattended mode. 


Examples:
      odinc -backup -source=\Device\Harddisk2\Partition1 -target=c:\MyDisk.img -comment="Backup of drive F"
    
Creates a backup of the first partition on the second disk to file c:\MyDisk.img 


      odinc -backup -source=3 -target=c:\MyDisk.img -comment="Backup of drive F"
    
Creates a backup of device with index 3 to file c:\MyDisk.img. Use odinc -list 

to see which device belongs to index 3: 
      odinc -list
      ...
      Index: 3
      Device Name: \Device\Harddisk2\Partition1
      Drive: F:\
      Label: Volume
      Type: Harddisk
      Size: 9.766GB
      ...
    


      odinc -restore -source=c:\MyDisk.img -target=\Device\Harddisk2\Partition1
    
Restores first partition on second disk from file c:\MyDisk.img 

All available options can be seen with the usage command odinc -usage: 

      Usage:
      ODIN [operation] [options] -source=[name] -target=[name]
      [operation] is one of -backup, -restore, -verify or -list
      [options] are:
      -compression=[bzip|gzip|none]   use bzip, gzip or no compression
      -makeSnapshot    make snapshot (VSS) before backup (implies -usedBlocks)
      -usedBlocks      copy only used blocks of volume
      -allBlocks       copy all blocks of volume
      -split=[nnn]     split image file every [nnn] MB
      -comment=[string] add comment to image file for backup
      [name]    name can be a device name like \Device\Harddisk0\Partition0 or
      a file name like c:\DiskCImage.dat or a number that refers to
      an index from the -list command
      -backup   creates an image from a disk or volume to a file
      -restore  restores a disk image from a file to a volume or disk
      -verify   checks an image for damage
      -list     prints a list of available volumes on this machine
      -force    suppress all warning messages and continue immediately (very
      dangerous!)

      Examples:
      ODIN -backup -usedBlocks -compression=gzip -source=1 -target=myimage.dat
      backups volume number 1 to image file myimage.dat with gzip compression
      and only used blocks (1 refers to index 1 of devices from output of -list)
      ODIN -restore -source=myimage.dat -target=\Device\Harddisk0\Partition0
      restores image from file myimage.dat to first partition of first disk
      ODIN -list
      prints all availaible volumes and disks with their name and number

      WARNING:
      USING THIS PROGRAM CAN DESTROY THE COMPLETE CONTENTS OF YOUR HARD DISK!!!
      Be sure that you know and have understood what you are doing or stop now!

