cancel
Showing results for 
Search instead for 
Did you mean: 

Tru64 hdd clone image

Nxo
Occasional Visitor

Tru64 hdd clone image

Hi everybody

This is my fist thread, but this has been a very useful tool for a long time. Here is my problem:
I have a Compaq Alphaserver ES40 with a Tru64 Unix 5.1A. I have two hard drives, one for the OS and other for the data. Few months ago the OS disk failed, and I had to replace it. I installed everything again, but it was very tedious.
Now I want to clone the OS disk to have a backup copy if necessary. I've tried to install some free software tools like PartImage, NFG or PING, but I can't make them work.
Does someone know how to clone the entire disk without buying commercial software?
I've been reading about dd, but most of the disk is blank now (I use almost 2 Gb and the disk has 18 Gb) and I don't want to clone the empty space, and dd makes it taht way.

Thanks in advance, and regards.
6 REPLIES
Rob Leadbeater
Honored Contributor

Re: Tru64 hdd clone image

Hi,

If this was me I'd be seriously thinking about getting a RAID controller for your server so you can forget about this sort of problem...

That said you should be able to do what you want without buying anything.

I'm assuming you know what you're doing with the OS, so the steps below are quite high level. If you need further assistance let us know.

1. Install the disk that you're going to clone onto.
2. Copy the disklabel from your current disk onto the new disk.
3. Create the relevant clone file domains and filesets on your new disk.
4. Use a vdump piped to vrestore to create a backup of each file system on the new disk.


Hope this helps,

Regards,

Rob
Vladimir Fabecic
Honored Contributor

Re: Tru64 hdd clone image

There are several ways how to do it. I will make one example.
Lets say that OS disk is dsk0 and your "OS clone disk" will be dsk2.
First you partition dsk2 and make partitions of same size like OS disk has. Also make boot block (advfs or ufs, depends what you have).
Then create advfs domains and file sets.
For example:
# mkfdmn /dev/disk/dsk2a root2_domain
# mkfset root2_domain root
# mkfdmn /dev/disk/dsk2g usr2_domain
# mkfset usr2_domain usr
and so on...
Then create mount points like /root_clone usr_clone and so on.
Following script should be ran from cron:
# mount /root_clone
# mount /usr_clone
....
# vdump -0 -f - / | (cd /root_clone; vrestore -x -f -)
# vdump -0 -f - /usr | (cd /usr_clone; vrestore -x -f -)
.....
# cp /etc/fstab.modified /root_clone/etc/fstab
# umount /root_clone
# umount /usr_clone

Notice that fstab.modified should look like:

root2_domain#root / advfs rw 0 1
/proc /proc procfs rw 0 0
usr2_domain#usr /usr advfs rw 0 2
usr2_domain#var /var advfs rw 0 2

...
This should work because this is procedure how I make "backup boot disk".

Hope it helps
In vino veritas, in VMS cluster
Nxo
Occasional Visitor

Re: Tru64 hdd clone image

Hi, thanks for answering.
Sorry, i think i have explained myself wrong. i don't have another disk in the server to make the backup. my options are to make the clone in the same disk, or use a WindowsXP workstation connected to the server. I have installed in the Unix server Samba and OpenSSL, and the WindowsXP has the Cerberus FTP Server, and shared directories.

Thanks again.
Vladimir Fabecic
Honored Contributor

Re: Tru64 hdd clone image

If your data disk is big enough, you can use it for second boot disk using my procedure.
Why don't you simply take backups to tape or NFS server?
In vino veritas, in VMS cluster
Rob Leadbeater
Honored Contributor

Re: Tru64 hdd clone image

Hmm... OK.

You could vdump or tar the OS partitions out to files and store them on your Windows box.

Just make sure that you've got enough space on the device you're creating the backups on.

Do you not have a tape drive ? That would be the easiest option...

Cheers,

Rob
Hein van den Heuvel
Honored Contributor

Re: Tru64 hdd clone image

How much data is there on the other disk?
Less that 18GB - 2GB?
How complex a partition/AdvFS setup?

How about cloning the data to system disk first. Make sure everything is there. And make a (tape?) backup.

Now clone (dd) the whole system disk with the data copy to the old data disk.
Tweak the /etc/fstab files on both.
Try a test boot of the second (old data - only) drive.
Reboot to the original system disk and point the daya mounitpoint/domains to the new location on the second drive. Use the second drive for data. You may want to play with the unused swap partition on the second dirve for /temp or such, or just as additional swap space (and go eager, if currently lazy).
Clone copies of live system files (/etc, /sbin/init...) to (savesets) on the other (data) drive every so often.
Clone changed data back to the system drive as needed.

Just some thoughts!
Hein.