Ghost-like mirroring tool for Sun boxes?

I'm looking for (don't know if it exists) a tool similar to the Symantec Ghost product for Sun boxes?

Any suggestions or pointers would be appreciated.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Not quite like Ghost (Ghost cann't handle Solaris). To clone a harddisk, if you have 2 identical HD, you
can use the 30 years old UNIX "dd" command to do the job.

boot up the system to single  user mode / (or use Solaris CD to boot up to single user mode).
use "format" command to find out the disk device name BUT DO NOT FORMAT the harddisk.

then use the following command:

dd if=/dev/rdsk/c0t0d0s2 of=/dev/rdsk/c0t1d0s2

This will copy disk c0t0d0    to c0t1d0.    s2 refer to the whole HD.

If you have two different HDs, you cann't use "dd", you have to use format, ufsdump, ufsrestore to
do the job.

use "format" command to partition the new HD,
you can make it to have the same number of partions (the size of the partition can be the same, or just bigger than the data size, or bigger).

  Assume that your first HD is c0t0d0, 2nd disk is c0t2d0
(use format command to find out the names in your system).

  you can then use "ufsdump + ufsrestore" to dump the partition one by one, then make the diskbootable.

  eg: your first harddisk have /, /var, /usr, /export
      4 filesystems(partitions) refer to /etc/vfstab for details.
       let's say you want to dump the / filesystm to 1st partion of the 2nd HD, you do:

# mount the target partition
mount /dev/dsk/c0t0d0s0 /mnt
/usr/sbin/ufsdump 0cf - / | (cd /mnt; ufsrestore rf -)

where finish file transfer, you do:
rm /mnt/restoresymtable
umount /mnt

repeat the above procedure to cope the other partitions

Perform fsck to all the partions in the 2nd HD.

Make the 2nd HD bootable:

installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk \

That's it. It should work for you.
If you're looking for the ability to "stamp out" Sun boxes using a standard config or set of configs, then what you want is Solaris Jumpstart.
U can try this software, which support many os including solaris.
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

In addition to the ufsdump/ufs restore method described above, I have successfully cloned live machines by copying each filesystem using cpio, and then doing the installboot thing. Cpio handles the special files better than tar can.
tar is not for system level backup, it can not handle special files (eg, device files).

ufsdump/ufsrestore is a Solaris specific backup command, it have no problem with
system level backup.

cpio can do the job as well. (system level backup, no problem)
later versions of tar do support backing up of special files.
soldatoAuthor Commented:
Is Jumpstart or Avail similar to Ghost?

I'm looking to "stamp out" clones, but the "standard configuration" file solution is not really an option.  I will have a custom configured application that needs to be imaged and dropped across a dozen or so Sun boxes of the same hardware type (drives, processor, ram, etc).

For that i think the jumpstart with work fine.

" I will have a custom configured application that needs to be imaged and dropped across a dozen or so Sun boxes of the same hardware type (drives, processor, ram, etc)."

dd if=/dev/rdsk/c0t0d0s2 of=/dev/rdsk/c0t1d0s2

willl do the job for you, exactly image.
The closest tool to Ghost and easiest is Solaris' 'fssnap'  It allows you to take a snapshot of a filesystem, but does not require as much up front configuration as Jumpstart.  It is also easier to manage than 'dd' (although I use dd with a lot of small backups...)  

The best thing about fssnap is that you can take a snap of your base filesystem, and then a snap of a webserver, ftp server, etc.  Then, you just lay down the base filesystem (root, etc.) and then any others you want to build.
Hanno P.S.IT Consultant and Infrastructure ArchitectCommented:

Use the ufsdump + ufsrestore (best together with fssnap) and do the installboot afterwards.
The steps required are:
1) Copy VTOC from source to target disk (or do manual formatting using "format")
2) for each filesystem, dump it using ufsdump and put it on the target disk using ufsrestore (you can connect ufsdump and ufsrestore using a pipe). If you wish you can use fssnap to read off live filesystems with ufsdump.
3) Do the installboot for the root slice on the target disk
If you want to boot from the target disk make sure you change the moutn entries in /etc/vfstab accordingly!

Here's a small script to clone a disk using these standard UNIX tools:


if [ "$#" != 2 ] ; then
  echo "usage: $0 sdisk tdisk"
  echo "where: sdisk is the source disk (e.g. c0t0d0)"
  echo "       tdisk is the target disk (e.g. c0t1d0)"
  echo "Note:  Please omit slice numbers!"
  exit 1

format</dev/null | grep "\.[       ]$1" >/dev/null 2>&1 && S=$1
format</dev/null | grep "\.[       ]$2" >/dev/null 2>&1 && T=$2
if [ -z "$S" ] ; then
  echo "ERROR: Source disk $1 does not exist -- exit!" ; exit 2
elif [ -z "$T" ] ; then
  echo "ERROR: Target disk $2 does not exist -- exit!" ; exit 3

clear ; echo "
  ATTENTION: This script will copy the whole disk $S to $T
             If this is NOT what you intended to do, abort
             by pressing Ctrl-C now!

  Are you ready now [N] ? \c"
read ans mist ; echo ""
[ "$ans" != "J" -a "$ans" != "j" -a "$ans" != "Y" -a "$ans" != "y" ] && exit 1

prtvtoc /dev/rdsk/${S}s2|fmthard -s - /dev/rdsk/${T}s2      # copy VTOC
for i in `tail -r /etc/mnttab|grep /a|awk '{print $2}'`      # make sure nothing is
  do umount -f $i >/dev/null 2>&1                  # mounted under /a ...
[ -d /a ] || mkdir /a                              # create /a if not here

SD=/dev/rdsk/$S ; TD=/dev/rdsk/$T                  # the raw disk devices
fs=`df -kl | grep \`echo $SD | sed -e 's/rdsk/dsk/'\` |\
    grep /dsk/ | sed -e 's/^.*\(s[0-9]* \).*/\1/'`      # fs on boot disk used

for i in $fs;do
  echo "creating file system on ${TD}$i ...\c"
  echo y | newfs ${TD}$i >/dev/null 2>&1 ; echo ""      # create filesystems

for i in $fs ; do                              # mount new disk under
 echo "copying all data from slice $S$i to $T$i ..."      # /a and copy all data
 M=/a`df -kl|grep ${S}$i|awk '{print $6}'|sed -e 's!/$!!'`
 F=`df -kl|grep ${S}$i|awk '{print $6}'`            # from source disk
 mount `echo ${TD}$i|sed -e 's/rdsk/dsk/'` $M            # to target disk
 ( /etc/init.d/xntpd stop ; sleep 30 ; /etc/init.d/xntpd start ) &
 ufsdump 0f - `fssnap -F ufs -o raw,bs=$M,unlink ${F}`|\
   ( cd $M ; ufsrestore rf - ) >/dev/null 2>&1            # (using ufsdump
 fssnap -F ufs -d ${F} >/dev/null 2>&1                  # with UFS snapshot)
 echo ""

# Okay, now let's make the new disk bootable:
installboot /usr/platform/`uname -m`/lib/fs/ufs/bootblk \
    `df -kl /a | sed -ne 's/\(\/dev\/\)\(dsk\/[^       ]*\).*/\1r\2/p'`

# and modify the mount entries in /etc/vfstab on new disk:
sed -e "s/${S}/${T}/g" /etc/vfstab > /a/etc/vfstab

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Hanno P.S.IT Consultant and Infrastructure ArchitectCommented:
P.S.: You may call the script I've just posted "ghost" if you want ;-)
Hi soldato

Solaris 8 2/02 and later has a "Ghost" like feature.  ie the ability to clone one machine and install it onto any other machine... it's called "WebStart Flash Archive".

This allows you to create an image of say a E250 and install the same image onto a SunBlade 100, or a SunFire 4800 via jumpstart, tape, CD/DVD or HTTP.  This is by far the easiest method compared to all the other detailed and it does just the job you require. IMO it does a better job than Ghost does especially as it's a fully supported option provided by the OS manufacturer :-)

You can also do a lot more with Flash archive than you can with the other methods or even Ghost and it's faster too :-) (IMO).

Check out details of "Flash Archive" at

Oh I also forgot to mention that Flash Archive in Solaris 9 now supports "Layered Archives" as well as the ability to split and merge archives.

The possiblities are quite amazing.  Give it a try, you won't be disappointed (at least if you use Sol 9)

Oh yes, and you can also use LiveUpgrade with flash archives... this allows you to build say a Sol 9 machine, create an archive of it, then update a Sol 7 machine using LiveUpgrade with the only downtime being that of a single reboot...

Has anyone tried udpcast? I've a coworker who has definately won me over. I don't know if it is a native sloaris product, but it is quite extensible.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.