Hello all,
I make dumps on a regular basis of the bootdisks of our Solaris 2.6 servers
to a remote host, like this:
ufsdump 0f - <raw-device> | (rsh <remote-host> "cd /backup_dir; ufsrestore
xf -").
This works fine. However, I want to make a script which I can place on any
new server without having to modify it, so I try something like this:
REMOTEHOST=<ip-address>
ROOTDEV=`awk '/[ ]\/[ ]/ {print $2}' /etc/vfstab`
REMOTE_BACKUP=/${HOSTNAME}_backup
and have the shell substitute these variables:
ufsdump 0f - ${ROOTDEV} | (rsh ${REMOTEHOST} "cd ${REMOTE_BACKUP};
ufsrestore xf -)"
This doesn't work fine. It in fact starts to restore to the local bootdisks,
with corruption as a result.
I have checked in the script that the variables have the correct values and
I have tried different syntaxes,
but with no result.
Has anybody any idea what is happening?
Oscar Goosens