Remote backup using ufsdump
Hi All,
I've been trying to perform a backup of my system server for another system. My initial problem was that the other system's server is a Sun V440 while mine is a Sun V480, thus, the disk has a different SCSI connector than mine. I discovered that one of my workstations (Netra 1405) has the same style SCSI connector as the 440 disk, so I've been attempting to perform the backup with the other system server's disk in Bay 1 of my workstation.
The two drives are also a different model and size, so I've been using the format command to adjust the partitions accordingly in an effort to make them mirror my disk. Once I adjust the label and write it to the disk, I'll newfs the newly created partitions.
Next, as root on my system server, I'll issue the following: ufsdump -0f workstation:/dev/dsk/cxtxdxsx /dev/dsk/cxtxdxsx | ufsrestore -rf workstation:/dev/dsk/cxtxdxsx
*the x's correspond to the target, slice, etc of the disks I'm using
The dump will execute but will display the message "volume is not in dump format." After the dump finishes ~20min or so, I'll issue a format command on rws3 to check out the disk, and it says "<disk formatted> label?" I'll enter yes, and the partition tables come up, but they're all changed around from what I initially configured. I can't mount the newly dumped-to partition either. Is the syntax of my command correct? Should I try to dump to the raw device? Do both servers have to be running the same version of Solaris? -- please advise.
One more concern, just dumping data to the disk partitions does not make a golden disk. I did some research and found a command /usr/sbin/installboot that can be used to install a boot block to a newly cloned disk. Is this something I'm going to be able to do remotely from my system server to my workstation as well? -- or will the other system just have to insert the disk into their server and install their boot block from there?
I greatly appreciate any help,
Dave
[2036 byte] By [
dctops] at [2007-11-26 10:41:35]

# 1
> Next, as root on my system server, I'll issue the
> following: ufsdump -0f workstation:/dev/dsk/cxtxdxsx
> /dev/dsk/cxtxdxsx | ufsrestore -rf
> workstation:/dev/dsk/cxtxdxsx
What do you intend this command to do?
You are giving ufsdump a remote filename, but then pipe it into ufsrestore.Since the filename is remote, there's no data for the ufsrestore to read.
It doesn't work like that.
Your best bet would be to assume that you have ssh (or rsh) between the machines:
serverA# ufsdump 0f - /<filesystem> | ssh serverb "cd /<newfilesystem> && ufsrestore rf -"
> The dump will execute but will display the message
> "volume is not in dump format."
Actually, that's ufsrestore saying that. Note that ufsrestore always restores on the local machines. So it looks to me like you're trying to send a dump image to a workstation, then run ufsrestore to read the data from the remote workstation and restore it locally on the server.
After the dump
> finishes ~20min or so, I'll issue a format command
> on rws3 to check out the disk, and it says "<disk
> formatted> label?" I'll enter yes, and the
> partition tables come up, but they're all changed
> around from what I initially configured.
ufsdump doesn't manage partition tables. Never stick a dump image on a raw device like that if it has cylinder zero or you'll corrupt the label.
ufsrestore must already have the filesystems sized, created, and mounted before it can work.
> I can't
> mount the newly dumped-to partition either. Is the
> syntax of my command correct? Should I try to dump
> to the raw device?
Not unless you're doing something very special, and I don't think you are.
Do both servers have to be
> running the same version of Solaris?
No.
--
Darren
# 2
First off, thanks for the help :)
I'm trying to perform a remote dump from one of my servers to one of my workstations. I want the disk I'm dumping-to to be a working-clone, pretty much able to boot off of it and use it in place of my current boot disk, thus I think I need to do a ufsrestore after the dump.
Givens: I have my server aliased to mstar and my workstation to ws
As you so kindly pointed out, it appears the syntax of my command is incorrect. FYI, I do have rsh capabilities between the two.
Would something like this serve my purpose?
- mount the disk slice I'm trying to dump to on /a of my ws and execute the following as root on my mstar:
ufsdump -0f ws:/dev/dsk/c#t#d#s# --> following this will be the device name of my mstar slice I want to dump from ex. c#t#d#s# then perhaps pipe this to my ws where I have the dev mounted. ex ( rsh ws; cd /a; ufsrestore -rf)
The whole command will look like this:
ufsdump -0f ws:/dev/dsk/c#t#d#s# c#t#d#s# | (rsh ws; cd /a; ufsrestore -rf)
Look good? -- is the syntax I have displayed correct?
Thanks Again!
Dave
Message was edited by:
dc_tops
# 3
> The whole command will look like this:
>
> ufsdump -0f ws:/dev/dsk/c#t#d#s# c#t#d#s# | (rsh ws;
> cd /a; ufsrestore -rf)
Not at all. You need to put the commands within the rsh, not as part of a subshell in the server. You are still trying to dump to a device on the workstation which will not work. You must dump to standard out or the pipe is useless. You are not passing a file to ufsrestore to read from.
I already posted the syntax in the previous message.
serverA# ufsdump 0f - /<filesystem> | ssh serverb "cd /<newfilesystem> && ufsrestore rf -"
So if you just want to dump the root filesystem change "/<filesystem>" to "/" and change "cd /<newfilesystem>" to "cd /a".You'll need to do this mulitple times if you have multiple filesystems. Change "ssh" to "rsh" if you can't make use of ssh.
At the end, you would want to apply bootblocks to the drive if it has never had them installed before. See the 'installboot" man page and run it on serverb.
--
Darren