mymirror-0.1
--------------
---
_____
______________________________(_)______ ________ ________ ___
__ ___/ __ \_ ___/_ ___/_ /__ __ `__ \_ / / /_ __ `__ \
_ / / /_/ / / _ / _ / _ / / / / / /_/ /_ / / / / /
/_/ \____//_/ /_/ /_/ /_/ /_/ /_/_\__, / /_/ /_/ /_/
/____/
This is 'mymirror', a simple but very powerful backup utility that allows
to mirror any block oriented device on other such device preserving exact
drive geometry. In fact, this proggy allows to make standard file based
backups as well.
Main features:
- very informative step-by-step output
- filesystem independent(but in some cases position dependant),
in theory you can mirror even alien - Amiga incompatible -
media if you know its parameters
- knows how to talk to NSD64/TD64 compliant devices(4+ GiB support),
but wont allow to read/write beyond 128 GiB for security reasons
- allows to distribute backups across many files(2+ GiB support)
and rechunkify them if there is a need, still preserving base
drive geometry and mirror position
- allows to refresh existing medium, so those who worry about
disappearing magnetic properties of a harddrive can sleep well
(this process in theory should be considered safe, even with
unexpected program termination in mind, but i do not recommend
to do this without backing up the data first)
- just perfect for making frequent, always at hand CompactFlash
powered mirrors(these cheap CF cards are not very good as regular
harddisks, but mirroring to them is toughly different story)
- might be of help when a filesystem has crashed(you can mirror
that area and try to fix it on some other media)
PLEASE NOTE, THIS PROGRAM MAY BE VERY DANGEROUS TO YOUR DATA WHEN USED
WITHOUT ENOUGH CARE! ALWAYS DOUBLE CHECK THE ARGS ON THE COMMAND LINE
AND THE DRIVES YOU ARE CONNECTING BEFORE PASSING MAGIC WORD THAT WILL
ACTUALLY START THE MIRRORING PROC. AND THUS POSSIBLY MAKE UNRECOVERABLE
CHANGES!
---
NOTES:
[*]
Requires 68020(no FPU)+, OS 2.04+, 256+ KiB of free memory
[*]
Perhaps, proggy will work on a 68000 as well, but i dont know how well
64bit types emulation will be.
[*]
Creating emergency mountlist per backup is strongly recommended. Its
best to print it on paper.
[*]
Before using this utility, make sure that your OS is free of programs
who trash the memory disasterously(who write to the mem. illegaly).
To examine that use 'muforce' + 'muguardianangel'.
[*]
Before making mirrors or backups of your master harddisk, do 'lock'
on every filesystem, so overall backup realiability will be improved!
[*]
Be careful when restoring from file archives though, as they remember
position of the area they were made of! Of course, you can override
these values using 'lc' and 'hc' from the command line.
[*]
If there is a need to override the geometry for a source file archive
then all the params('mc', 'mh', 'mb', 'me') must be provided! This is
not true for devices, where each parameter is standalone.
[*]
Source cylinder markers('lc' and 'hc') have advantage over dest. ones,
but if dest. 'hc' or (('hc' + 1) - 'lc') is smaller than source
(('hc' + 1) - 'lc') copy cannot take place! In other words, if source
area is larger than dest. area then no copy will be attempted.
[*]
If destination is a file, then only 'cl' will be accepted, and at the
same time 'cl' will be ignored for the source independently of type
of object.
[*]
Memory size('ms') and memory type('mt') params are only being accepted
in the source object, so if you plan to clone a device that can access
fast memory on a device than can only access chip mem., then you will
have to pick chip memory in the source!
[*]
While mirroring harddrives from the very beginning(incl. 'RDB', where
drive info. will be exactly the same!) to the end is generally a good
idea, i truly recommend partial mirrors(per partition) of the most
important data, because this is faster than doing whole drive and yet
you can preserve drive info per unit! All you have to do is to reflect
source drive layout on the destination drive and be careful about the
cylinder ranges.
[*]
Warning! It seems that SFS does some sort of absolute addressing for
its objects, so there is no way to relocate the mirror! For example,
if such a partition starts at cyl. 1024 and ends at cylinder 2048,
then it must be restored exactly at this location on the destination
media! Also, 'diskchange' after mirroring may not work, you will
have to remount that partition or just reboot.
[*]
Generally, to learn how to quickly and safely use this program or maybe
to find a bug(oops, did i say a bug ;-) ?) do some probes on media that
is typically safe to fiddle with, like 'trackdisk' or 'ramdrive', so
you can then use it without fear on other media.
[*]
Format of the geo. file('mym'), that also stores the pos. is as follows:
<cs=cylinders/a/n> <hs=heads/a/n> <bt=bpt/a/n> <bs=blocksize/a/n>
[lc=lowcyl/n] [hc=highcyl/n]
---
USAGE:
*** t: mymirror (<s=src/k/a> <d=dest/k/a>)=("<fe=file/a> [lc=lowcyl/k/n]
[hc=highcyl/k/n] [ms=memsize/k/n] [mt=memtype/k/n]
[cl=chunklen/k/n] [mc=mancyls/k/n] [mh=manheads/k/n]
[mb=manbpt/k/n] [me=manbsize/k/n]") [letsgo/s]
<s=src/k/a> - source medium or file and/or its arguments.
<d=dest/k/a> - destination medium or filename and/or args.
[letsgo/s] - master switch that will start the mirroring
process, without it you can see what will
possibly happen.
<fe=file/a> - device#unit("trackdisk.device#0") or file.
[lc=lowcyl/k/n] - cylinder at which mirror should start.
[hc=highcyl/k/n] - cylinder at which mirror should end.
[ms=memsize/k/n] - how much memory to use for read/write buf.
(this allocation will be block aligned)
[mt=memtype/k/n] - what type of memory to use, 1 = public, 2 =
chip, 512 = 24bitdma, by default 1 is set.
[cl=chunklen/k/n] - how big(in bytes) single backup file should
be(this number will be block and/or cyl.
aligned), by def. it is as big as one CD-R
can be, so circa 700 megs.
[mc=mancyls/k/n] - allows to specify how many cyls media has.
[mh=manheads/k/n] - allows to specify how many heads.
[mb=manbpt/k/n] - allows to spec. how many blocks per track.
[me=manbsize/k/n] - allows to specify new block size(in bytes),
which must be multiple of 512.
(!) '<s=src/k/a> <d=dest/k/a> [letsgo/s]' are master args., everything
else is and option, maybe except for '<fe=file/a>' that must show up in
both '<s=src/k/a>' and '<d=dest/k/a>' respectively.
---
EXAMPLES:
; this is what i use to clone my 2 giga big 'SYS:'(SFS) part.
; to a 16 GiB CF card, this is much faster that copying files
; through a filesystem
mymirror s "sc?i.device#0 lc 2 hc 1028" d "sc?i.device#1 lc 2 hc 1028" letsgo
; ### hello and welcome to 'mymirror' ver. 0.1, please be seated.
; /// going to obtain geometry from 'scsi.device' on unit 0 ...
; /// no more fear, because real TD64 is here 8-) !
; /// going to obtain geometry from 'scsi.device' on unit 1 ...
; /// no more fear, because real TD64 is here 8-) !
; /// dumping quick geometry characteristics ...
; $$$ source: destination:
; $$$ [cylinders ] = 65536 [cylinders ] = 7726
; $$$ <heads > = 16 <heads > = 16
; $$$ <blockspertrack> = 255 <blockspertrack> = 255
; $$$ <blocksize > = 512 <blocksize > = 512
; *** warning, source medium has more cylinders than the dest. one!
; /// allocated 65280(65024) bytes for data buf. in type 1 memory.
; /// ready to xfer 1027(2-1028) cyl(s) into 1027(2-1028) cyl. area.
; /// src. range: 4177920-2149539840 [B], dst. range: 4177920-2149539840 [B].
; /// assuming copy mode requested is: 'MYM_COPYDISK2DISK'.
; /// processing cyl(src.). 1028 of 1028 , curr. at byte 2149539840 ...
; /// mirroring process took 0 day(s) and 00:36:01 sec(s).
; dump contents of 'DF0:' to a file(after the execution two
; files will appear, one with the geometry and one with the data)
mymirror s trackdisk.device#0 d df0_mirror letsgo
; dump contents of 'DF0:' to separate files, where each file is
; a track which is 11264(minimal track len. of 'trackdisk.device')
; bytes long, value specified is 512 to tell 'mymirror' we want
; lowest possible value which will be in fact 11264 bytes
mymirror s trackdisk.device#0 d "df0_mirror_2 cl 512" letsgo
; restore that funny chunkified backup
mymirror s df0_mirror_2 d trackdisk.device#0 letsgo
diskchange df0:
; transform that funny backup into less fragmented one,
; say two equally sized(901120 / 2 == 450560) files
mymirror s df0_mirror_2 d "df0_mirror_3 cl 450560" letsgo
; read just one 39th track from 'DF0:'
mymirror s "trackdisk.device#0 lc 39 hc 39" d df0_track39 letsgo
; transfer 'DF0:' to 'RAD:'(please note, 'ramdrive.device' does
; not understand TD_GETGEOMETRY so we have to specify it by hand)
mount sys:storage/dosdrivers/rad
mymirror s trackdisk.device#0 d "ramdrive.device#0 mc 80 mh 2 mb 11 me 512" letsgo
diskchange rad:
---
megacz@usa.com
|