SYNOPSIS

       clonehdd  -src=device  -dst=device -swap=size [-safe] [-freespace=size]
       [-fstab=device] [-force]


DESCRIPTION

       Tool for copy partitions to another HDD. FreeBSD  stores  its  data  on
       partitions,  which  incapsulated  in  slices.  Soft,  such as Partition
       Magic, Acronis, etc. detect only slice, not  real  partitions  on  that
       slice.   CloneHDD  correctly  understand size diference between two HDD
       and change size of each partition  proportionally  for  filling  entire
       HDD.



OPTIONS

       -src=device (REQUIRED)
              Name  of  device (HDD) which contains original data. Eg. if path
              to device is /dev/ad0, then you type only "ad0".  CloneHDD  will
              keep SRC partition unchanged.

       -dst=device (REQUIRED)
              Name of device (HDD) which will contain your backup data. Eg. if
              path to device is /dev/ad2, then you  type  only  "ad2".
              WARNING! ALL DATA ON THIS DEVICE WILL BE DESTROYED!

       -swap=size (REQUIRED)
              Size of new swap partition in MBytes.

       -safe  If  defined, use safe-mode copying data. If there is minimum 50%
              free space on partition, CloneHDD tries to  copy  data  in  safe
              mode,  even  if  "-safe"  flag  is  unset.  If free space is not
              enough, CloneHDD copy data in unsafe mode. Also you will  see  a
              warning message.  If "safe" flag is set, CloneHDD will copy data
              only in safe mode. If free space is not  enough,  CloneHDD  will
              skip copying this partition.  See details below.

       -freespace=size
              Space  in  MBytes,  reserved  as free on SRC partition. Clonehdd
              checks, if SRC partition have enough free  space  the  following
              way: (Data size) * 2 + (Freespace) < (Partition size).  Default:
              100MB.

       -fstab=device
              This value will be written in /etc/fstab file on DST  partition.
              Default: value from -src parameter.

       -force Do  not  ask  questions,  such  as "Are you sure?". Useful, when
              CloneHDD start with crontab(1)

       When safe mode is defined, CloneHDD  makes  image  of  partition,  then
       store it on the same partition in ".snap" directory and write it on DST
       HDD. If non safe-mode defined, CloneHDD will copy data on the fly. See



USING BACKUP HDD

       If  something  wrong with your SRC HDD in future, you can take out cor-
       rupted SRC HDD and put reserve DST HDD on that place.  Note,  that  you
       must  set  correct value to -fstab parameter to boot FreeBSD correctly.
       If you forget to turn off starting CloneHDD from crontab,  script  will
       not  run,  because  there  is  a  file "/backup-mode" in root folder of
       filesystem on cloned partition.  Remove this file if you want to  clone
       such HDD as SRC partition.



CRONTAB

       Tool works fine from crontab(1). Put line

       clonehdd [parameters] -force >/dev/null

       to  /etc/crontab.  All  error  messages  will be sent to STDERR and you
       receive mail from cron daemon with this information.  All  normal  mes-
       sages will be sent to STDOUT and then dropped on /dev/null device.



RETURN VALUES

       If CloneHDD failed to do something, it will exit with exit code 1. Oth-
       erwise, exit code will be zero. In version  2.0.2,  CloneHDD  does  not
       control  if error occured in dump(8), restore(8) and rest external com-
       mands.



EXAMPLES

       clonehdd -src=ad0 -dst=ad2 -swap=1024
              All data from /dev/ad0 will be copied to /dev/ad2.  Each  parti-
              tions  size  will  be  increased  or  decreased  proportionally,
              according to difference between 2 HDD. Only swap  size  will  be
              1024 MBytes. Theese are minimum parameters, that are required.



SEE ALSO

       dump(8), restore(8), crontab(1)



AUTHOR

       Anton Lysenok, bart@tapolsky.net.ua

       https://sourceforge.net/projects/clonehdd/



version 2.0.3                  15 September 2007                   clonehdd(8)

Man(1) output converted with man2html