Restoring a system from a backup


 
Thread Tools Search this Thread
Operating Systems Solaris Restoring a system from a backup
# 1  
Old 02-28-2014
Restoring a system from a backup

I have backed up the contents of my Solaris 10 machine in its entirety, and I'm trying to figure out if I can somehow use this archive to restore my old system just as it was on a new machine. Assuming I have all files from my old machine backed up, is this possible?

What I've been trying to do is create a new machine with the same filesystem layout as my original machine, install the same version of Solaris on it, and then replace the data with the data from my backup but this did not work.

There are probably certain directories that I should not overwrite with the contents of my backup (/boot? /dev?) but I'm not sure which.

Is there any way to restore or recreate my original system just as it was, if I have all of the contents backed up?


EDIT: I didn't want to bump an old post to say thanks, so I'll put it here. Thanks hicksd8 for the help!

Last edited by unblockable; 03-25-2014 at 01:28 PM..
# 2  
Old 03-01-2014
The wording of your post doesn't tell us much. What is the old platform? What is the new platform? What version of Solaris exactly? (Is the version pre-10u3 boot-archive architecture, or post-10u3 non-boot-archive?) What filesystems are they? ufs or zfs? What exactly is the backup format? cpio, ufsdump or what?

Looking at your profile and posts so far on this forum I cannot tell you whether you have the knowledge to do this. Can you give a clue as to your skill level. You say that you've laid out a copy of the filesystems?

What I'm saying that it's probably do-able but can be tricky. I'm sure we can provide the missing pieces of the jigsaw if you have the experience.

---------- Post updated at 07:12 PM ---------- Previous update was at 09:10 AM ----------

And also, what media is your backup stored on? A tape drive that you're going to attach to the new platform, a remote (nfs) node, or what?
# 3  
Old 03-03-2014
Thanks for the reply.
Quote:
Originally Posted by hicksd8
The wording of your post doesn't tell us much. What is the old platform? What is the new platform? What version of Solaris exactly? (Is the version pre-10u3 boot-archive architecture, or post-10u3 non-boot-archive?) What filesystems are they? ufs or zfs?
Sorry about that!

Right now I'm trying to do this with Solaris 10 update 10 on VMWare, but I am looking for information that would apply to SPARC machines too.

UFS filesystems.

Quote:
Looking at your profile and posts so far on this forum I cannot tell you whether you have the knowledge to do this. Can you give a clue as to your skill level. You say that you've laid out a copy of the filesystems?
Please consider me a novice! I have a rudimentary understanding of Solaris and filesystems.

And I have laid out a "copy" of the filesystems on my new VM in the sense that I have created filesystems (/opt, /, etc.) on the same slices as the original machine and I have tried to create them the same size as the original VM but I might be off by a few megabytes.

Quote:
What I'm saying that it's probably do-able but can be tricky. I'm sure we can provide the missing pieces of the jigsaw if you have the experience.

---------- Post updated at 07:12 PM ---------- Previous update was at 09:10 AM ----------

And also, what media is your backup stored on? A tape drive that you're going to attach to the new platform, a remote (nfs) node, or what?
I've backed up my files using some backup application that I'd rather not name at the moment. It is stored on our backup server.

What I did was install a new version of Solaris and copied over my old files to some directory (lets say /restore). Then I booted Solaris off of the CDROM into read-only mode and mounted my root filesystem to "/a" and then I went inside /a and overwrote all of the existing directories (/boot, /dev, /opt, etc.) with the files from my backup, and I'm sure those more familiar with Solaris will tell me it was silly to think this would work, which it did not. I'm guessing I shouldn't overwrite directories like /boot and /dev.

So assuming my backup contains *all* files that were in my previous system, is there a way to restore these files onto a new machine and have more or less a copy of my old machine?
# 4  
Old 03-03-2014
From what you say I think that you're not so much of a novice. You will understand that to instruct a true novice to do this would be extremely time consuming and very likely to go wrong.

However, I'm still confused. What is your starting platform? You have Solaris 10u10 on x86 and you want to move to VMware? Or you have Solaris 10u10 on SPARC and want to move to SPARC?

(To move between x86 and SPARC architecture, or vice-versa, is difficult and requires the use of a quirky emulator. Not recommended.)

I can certainly help you SPARC to SPARC. If it's x86 to VM that you want I'm sure there are other members on this forum with more knowledge than me.

Last edited by hicksd8; 03-03-2014 at 08:29 AM..
# 5  
Old 03-03-2014
Quote:
Originally Posted by hicksd8
However, I'm still confused. What is your starting platform? You have Solaris 10u10 on x86 and you want to move to VMware? Or you have Solaris 10u10 on SPARC and want to move to SPARC?
Right now I am experimenting with VMWare -> VMWare since it is easy to duplicate/recreate VMs. However we also have standalone x86 systems and SPARC machines, so I am trying to figure out a process for all variants, including ZFS/Solaris11 if possible.

I am always trying to restore to the same type of hardware and oslevel.

VMWare Solaris 10u10 -> VMWare Solaris 10u10
SPARC Solaris 10u11 -> SPARC Solaris 10u11
etc.
# 6  
Old 03-03-2014
This only applies to SPARC and UFS filesystems

The trick is to make Solaris do most of the work otherwise there will be a very large number of files to modify. So, at the very base level, it goes like this.........

Planning....count number of filesystems, get all filesystem sizes, record all VTOC's, and amount of swap configured.

Set up a 'third node' to take the ufsdump(s) and create the share.

Use 'fssnap' and 'ufsdump' to dump all filesystem(s) out to the third node.

Install the same version of Solaris on the target machine (just to ensure that it will run, OBP, hardware, compatibility, and all that). Whilst doing that get the name/type of the ethernet inferface.

Boot the target node from DVD (single-user) and format, label, and write the VTOCS for the filesystem(s) and swap.

'newfs' all the non-swap filesystems.

Manually, plumb, address, and 'up' the network interface, and mount the remote filesystem on the third node containing the ufsdumps.

'ufsrestore' all the filesystems onto the target node.

Write out the bootblock ('installboot') for this platform.

CAREFULLY modify the vfstab on the target node to ensure it tells Solaris where to find all the filesystems.

Modify the 'system' file to suit the platform.

Rename the 'hostname.<Ethernet interface>' file to the new suffix (interface name).

Delete the old device nodes (/dev/dsk/c*, /dev/rdsk/c*, /dev/cfg/c* , etc) and recreate to suit the target platform (devfsadm).

Double check everything and when happy, shutdown the system.

If you haven't changed the ip address on this configuration ensure the original machine is shut down. This will use the same ip address.

On the very first boot, ensure to use the -r switch:

Code:
boot -r

to warn Solaris that it needs to reconfigure to sort out our mess. Make a coffee and wait for Solaris to sort everything out.

I hope that helps. If you need any of this expanding as you are doing it then post your questions back.

Last edited by hicksd8; 03-03-2014 at 04:24 PM..
This User Gave Thanks to hicksd8 For This Post:
# 7  
Old 03-03-2014
A supported way to clone a Solaris 10 server is to use Flash Archives. You use the flarcreate command to create the source archive. Then a regular Solaris installation will use that archive to rebuild the new system and take automatically care of most underlying details.
This User Gave Thanks to jlliagre For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Cloning a system via mksysb backup from one system and restore to new system

Hello All, I am trying to clone an entire AIX virtual machine to a new virtual machine including all partitions and OS.Can anyone help me on the procedure to follow? I am not really sure on how it can be done.Thanks in advance. Please use CODE tags for sample input, sample output, and for code... (4 Replies)
Discussion started by: gull05
4 Replies

2. Shell Programming and Scripting

Restoring files from backup based on ctime

Hello, I need to restore some yesterday emails from backup within a 5 hours timeframe this is a openvz container, backup is made by rsync files to another partition in the same server I have tried to do this #!/bin/sh cd /vz/backup/414/home/smartftp/mail/domain1.com/ for dir in new... (6 Replies)
Discussion started by: cuantica
6 Replies

3. UNIX for Dummies Questions & Answers

[SOLVED] Restoring differential backup files

I'm using a script (automysqlbackup) to dump mysql db's to .sql file followed by taking one full backup of the .sql file and the differential backups of the newer sql file every day using the tool diff. Now the backup destination folder contains files like, I would like to how do i restore... (3 Replies)
Discussion started by: csengineer
3 Replies

4. AIX

restoring mksysb backup of a clustered server configured in HACMP

Hi, I have done NIM restoration via nim_bosinst a lot of times but I have some doubts on restoring a server which is clustered specifically HACMP. Previously, I don't know the trend but after doing a nim_bosinst, I can see the client's hostname is back to "localhost" rather than its original... (0 Replies)
Discussion started by: depam
0 Replies

5. Solaris

Restoring a Root File System that was on a metadevice

Hello I use Solaris 10. I need to restore the root file system, but I don't know how . i can only boot the server in safe mode or with the cd (ok boot cdrom -s) Do you guys know a good procedure, I don't want to break the mirrors. ( the server is not a cluster). Its an emergency, i would... (4 Replies)
Discussion started by: feg
4 Replies

6. UNIX for Advanced & Expert Users

how to make a full system backup excluding data and restoring it to a new system

Hi, In order to have a sand box machine that I could use to test some system changes before going to production state, I'd like to duplicate a working system to a virtual one. Ideally, I'd like to manage to do it this way : - Make a full system backup excluding the user file system (this... (7 Replies)
Discussion started by: pagaille
7 Replies

7. AIX

Question about restoring from mksysb backup

Hello, Last night I applied a DB2 fix pack which is now causing problems with the application that uses db2. Prior to applying the fix pack I did a mksysb(rootvg) which includes the file system that has db2 installed on it. If I do a restore from this will it restore the db2 version back to... (1 Reply)
Discussion started by: jyoung
1 Replies

8. UNIX for Advanced & Expert Users

restoring backup using tar command

Please help me in resolving the issue. I have taken backup using the below command $ tar cvf - . |compress -> /opt/globusback2/needed_backups/apglsg.tar.Z I tried to restore the backup using the below command. $ zcat /opt/globusback2/needed_backups/apglsg.tar.Z | tar -xvf - ... (5 Replies)
Discussion started by: amirthraj_12
5 Replies

9. UNIX for Dummies Questions & Answers

restoring backup using tar command

Please help me in resolving the issue. I have taken backup using the below command $ tar cvf - . |compress -> /opt/globusback2/needed_backups/apglsg.tar.Z I tried to restore the backup using the below command. $ zcat /opt/globusback2/needed_backups/apglsg.tar.Z | tar -xvf - ... (2 Replies)
Discussion started by: amirthraj_12
2 Replies

10. OS X (Apple)

OS X Server: Trouble restoring mail from backup...

So I had some bad RAM in my server. Of course I didn't know it at the time. And it kept making the 10.3.5 updater crash. And that last crash did it. My drive was messed up. So I had to reformat and reinstall. Luckily I had a whole slew of fresh backups. But I'm really hung up on the mail. I backed... (0 Replies)
Discussion started by: l008com
0 Replies
Login or Register to Ask a Question