Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I posted an earlier question on how to backup and delete the solaris zone: How to backup and remove solaris zones?

But i like to ask also how can i restore the solaris zone just in case next time i need to access the files or the environment inside the old solaris zone?

share|improve this question
1  
This would depend on how you chose to back up your zones. –  Iain Oct 11 '11 at 7:56

1 Answer 1

Here is one way I've done it. Depends on whether you backed up the zone with the pax command

# mkdir -m 700 -p /zpool/zones/10gr2
# cd /zpool/zones/10gr2/
# ls ../..
oracle10gr2.pax  zones
# pax -r@f ../../oracle10gr2.pax
# zonecfg -z oracle10gr2
oracle10gr2: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:oracle10gr2> create -a /zpool/zones/10gr2
zonecfg:oracle10gr2> exit

Attach the new zone to the new host

# zoneadm -z oracle10gr2 attach
These packages installed on this system were not installed on the source system:
        SUNWpostgr-82-client (11.10.0,REV=2007.04.27.13.04)
        SUNWpostgr-82-contrib (11.10.0,REV=2007.04.27.13.04)
        SUNWpostgr-82-devel (11.10.0,REV=2007.04.27.13.04)
        SUNWpostgr-82-libs (11.10.0,REV=2007.04.27.13.04)
        SUNWpostgr-82-server (11.10.0,REV=2007.04.27.13.04)
        SUNWpostgr-82-server-data-root (11.10.0,REV=2007.04.27.13.04)
        SUNWpostgr-83-server-data-root (11.10.0,REV=2008.06.05.09.31)

At this point, we'll have to upgrade the new zone's packages, so run with the -u option:

# zoneadm -z oracle10gr2 attach -u
Getting the list of files to remove
Removing 5 files
Remove 12 of 12 packages
Installing 24 files
Add 19 of 19 packages
Installation of these packages generated warnings: SUNWpostgr-82-server-data-root
Updating editable files
The file </var/sadm/system/logs/update_log> within the zone contains a log of the zone update.
# zoneadm -z oracle10gr2 boot
# zlogin -C oracle10gr2
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.