Aubrey Li wrote:
> On Thu, Jun 5, 2008 at 7:03 PM, Richard L. Hamilton <[EMAIL PROTECTED]> wrote:
>   
>>> Hi list,
>>>
>>> for windows we use ghost to backup system and
>>> recovery.
>>> can we do similar thing for solaris by ZFS?
>>>
>>> I want to create a image and install to another
>>> machine,
>>> So that the personal configuration will not be lost.
>>>       
>> Since I don't do Windows, I'm not familiar with ghost, but I gather from
>> Wikipedia that it's more a disk cloning tool (bare metal backup/restore)
>> than a conventional backup program, although some people may well use it
>> for backups too.
>>
>> Zfs has send and receive commands, which more or less correspond to
>> ufsdump and ufsrestore for ufs, except that the names send and receive
>> are perhaps more appropriate, since the zfs(1m) man page says:
>>     
>>>  The format of the stream is evolving. No backwards compatibility is
>>> guaranteed. You may not be able to receive your streams on future
>>> versions of ZFS."
>>>       
>> which means to me that it's not a really good choice for archiving or 
>> long-term
>> backups, but it should be ok for transferring zfs filesystems between systems
>> that are the same OS version (or at any rate, close enough that the format
>> of the zfs send/receive datastream is compatible).
>>     
>
> For now I'm just interested in zfs send/receive.
> If I understand correctly, zfs send/receive need an existing pool on
> the destination
> disk. what I want to do is, install the system from beginning, using
> my own image.
>
> Let me take an example, I bought 3 machines, I installed one, and made a lot 
> of
> personal configuration, what is the easiest way to clone this one to another 
> two
> by ZFS functionality? I prefer to clone the system to an USB disk first.
>
> Thanks,
> -Aubrey
> _______________________________________________
>
>   
'zfs send' and 'zfs receive' write and read (respectively) to standard 
output.

Thus, you could do this:

(1) Install system A
(2) hook USB drive to A, and mount it at /mnt
(3) use 'zfs send tank/root > /mnt/root'  to save off the root ZFS 
filesystem to the USB drive
(4) boot system B from CD/DVD, either to single-user mode, or to the 
graphical installer.
(5) manually set up your zpools and zfs filesystems
(6) plug in the USB drive, again mounting it at (say) /mnt
(7) use 'cat /mnt/root | zfs receive tank/root' to restore the root 
filesystem


Note that this will create an EXACT DUPLICATE, with the same name, IP 
address, etc.  You should then run 'sys-unconfig', reboot the system, at 
which time it will ask you for a new name/ip/nameservice, etc. 

Alternately (and, preferably, in my opinion), do this:

(1) set up system A.
(2) mount USB drive (or, just a spare partition on A) on /mnt
(3)  flarcreate -n  myclone  -c -S -x /mnt /mnt/myclone.flar
(4) NFS share /mnt
(4) boot system B via DVD/CD
(5) during installation, after network config chose 'flash archive' as 
the media, and choose the NFS path A:/mnt/myclone.flar as the source, 
you should be able to do filesystem layout afterwards, picking your 
favorite ZFS layout then.
(6) wait - after the install, the system will reboot and ask you to 
input the name/ip/nameservice info.


Note:  I have not tried this yet, but it _should_ be straightforward.

-- 
Erik Trimble
Java System Support
Mailstop:  usca22-123
Phone:  x17195
Santa Clara, CA
Timezone: US/Pacific (GMT-0800)

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to