Skip Navigation Links | |
Exit Print View | |
System Administration Guide: Oracle Solaris Containers-Resource Management and Oracle Solaris Zones Oracle Solaris Legacy Containers |
1. Introduction to Solaris 10 Resource Management
2. Projects and Tasks (Overview)
3. Administering Projects and Tasks
4. Extended Accounting (Overview)
5. Administering Extended Accounting (Tasks)
6. Resource Controls (Overview)
7. Administering Resource Controls (Tasks)
8. Fair Share Scheduler (Overview)
9. Administering the Fair Share Scheduler (Tasks)
10. Physical Memory Control Using the Resource Capping Daemon (Overview)
11. Administering the Resource Capping Daemon (Tasks)
13. Creating and Administering Resource Pools (Tasks)
14. Resource Management Configuration Example
15. Resource Control Functionality in the Solaris Management Console
16. Introduction to Solaris Zones
17. Non-Global Zone Configuration (Overview)
18. Planning and Configuring Non-Global Zones (Tasks)
19. About Installing, Halting, Cloning, and Uninstalling Non-Global Zones (Overview)
20. Installing, Booting, Halting, Uninstalling, and Cloning Non-Global Zones (Tasks)
21. Non-Global Zone Login (Overview)
22. Logging In to Non-Global Zones (Tasks)
23. Moving and Migrating Non-Global Zones (Tasks)
24. Oracle Solaris 10 9/10: Migrating a Physical Oracle Solaris System Into a Zone (Tasks)
25. About Packages and Patches on an Oracle Solaris System With Zones Installed (Overview)
27. Oracle Solaris Zones Administration (Overview)
28. Oracle Solaris Zones Administration (Tasks)
What's New in This Chapter for Oracle Solaris 10 1/06?
What's New in This Chapter for Oracle Solaris 10 6/06?
What's New in This Chapter for Oracle Solaris 10 8/07?
How to List Oracle Solaris Privileges in the Global Zone
How to List the Non-Global Zone's Privilege Set
How to List a Non-Global Zone's Privilege Set With Verbose Output
Using DTrace in a Non-Global Zone
Checking the Status of SMF Services in a Non-Global Zone
How to Check the Status of SMF Services From the Command Line
How to Check the Status of SMF Services From Within a Zone
Mounting File Systems in Running Non-Global Zones
How to Import Raw and Block Devices by Using zonecfg
How to Mount the File System Manually
How to Place a File System in /etc/vfstab to Be Mounted When the Zone Boots
How to Mount a File System From the Global Zone Into a Non-Global Zone
Adding Non-Global Zone Access to Specific File Systems in the Global Zone
How to Add Access to CD or DVD Media in a Non-Global Zone
How to Add a Writable Directory under /usr in a Non-Global Zone
How to Export Home Directories in the Global Zone Into a Non-Global Zone
Using IP Network Multipathing on an Oracle Solaris System With Zones Installed
Oracle Solaris 10 8/07: How to Use IP Network Multipathing in Exclusive-IP Non-Global Zones
How to Extend IP Network Multipathing Functionality to Shared-IP Non-Global Zones
Oracle Solaris 10 8/07: Administering Data-Links in Exclusive-IP Non-Global Zones
How to Use dladm show-linkprop
How to Use dladm reset-linkprop
Using the Fair Share Scheduler on an Oracle Oracle Solaris System With Zones Installed
How to Set FSS Shares in the Global Zone Using the prctl Command
How to Change the zone.cpu-shares Value in a Zone Dynamically
Using Rights Profiles in Zone Administration
How to Assign the Zone Management Profile
Example--Using Profile Shells With Zone Commands
Backing Up an Oracle Solaris System With Installed Zones
How to Use ufsdump to Perform Backups
How to Create a UFS Snapshot Using fssnap
How to Restore an Individual Non-Global Zone
29. Upgrading an Oracle Solaris 10 System That Has Installed Non-Global Zones
30. Troubleshooting Miscellaneous Oracle Solaris Zones Problems
31. About Branded Zones and the Linux Branded Zone
32. Planning the lx Branded Zone Configuration (Overview)
33. Configuring the lx Branded Zone (Tasks)
34. About Installing, Booting, Halting, Cloning, and Uninstalling lx Branded Zones (Overview)
35. Installing, Booting, Halting, Uninstalling and Cloning lx Branded Zones (Tasks)
36. Logging In to lx Branded Zones (Tasks)
37. Moving and Migrating lx Branded Zones (Tasks)
38. Administering and Running Applications in lx Branded Zones (Tasks)
The following procedures can be used to back up files in zones. Remember to also back up the zones' configuration files.
You can perform full or incremental backups using the ufsdump command. This procedure backs up the zone /export/my-zone to /backup/my-zone.ufsdump, where my-zone is replaced with the name of a zone on your system. You might want to have a separate file system, for example, a file system mounted on /backup, to hold the backups.
To create the role and assign the role to a user, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.
global# zlogin -S my-zone init 0
global# zoneadm list -cv
You will see a display similar to the following:
ID NAME STATUS PATH BRAND IP 0 global running / native shared - my-zone installed /export/home/my-zone native shared
global# ufsdump 0f /backup/my-zone.ufsdump /export/my-zone
You will see a display similar to the following:
DUMP: Date of this level 0 dump: Wed Aug 10 16:13:52 2005 DUMP: Date of last level 0 dump: the epoch DUMP: Dumping /dev/rdsk/c0t0d0s0 (bird:/) to /backup/my-zone.ufsdump. DUMP: Mapping (Pass I) [regular files] DUMP: Mapping (Pass II) [directories] DUMP: Writing 63 Kilobyte records DUMP: Estimated 363468 blocks (174.47MB). DUMP: Dumping (Pass III) [directories] DUMP: Dumping (Pass IV) [regular files] DUMP: 369934 blocks (180.63MB) on 1 volume at 432 KB/sec DUMP: DUMP IS DONE
global# zoneadm -z my-zone boot
This approach uses the fssnap command, which creates a temporary image of a file system intended for backup operations.
This method can be used to provide a clean, consistent backup of the zone files only, and it can be executed while zones are running. However, it is a good idea to suspend or checkpoint active applications that are updating files when the snapshot is created. An application updating files when the snapshot is created might leave these files in an internally inconsistent, truncated, or otherwise unusable state.
In the example procedure below, note the following:
There is a zone named my-zone under /export/home.
/export/home is a separate file system.
Before You Begin
The destination backup is /backup/my-zone.ufsdump. You must create the directory backup under /.
To create the role and assign the role to a user, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.
global# fssnap -o bs=/export /export/home
You will see a display similar to the following:
dev/fssnap/0
global# mount -o ro /dev/fssnap/0 /mnt
global# ufsdump 0f /backup/my-zone.ufsdump /mnt/my-zone
You will see a display similar to the following:
DUMP: Date of this level 0 dump: Thu Oct 06 15:13:07 2005 DUMP: Date of last level 0 dump: the epoch DUMP: Dumping /dev/rfssnap/0 (pc2:/mnt) to /backup/my-zone.ufsdump. DUMP: Mapping (Pass I) [regular files] DUMP: Mapping (Pass II) [directories] DUMP: Writing 32 Kilobyte records DUMP: Estimated 176028 blocks (85.95MB). DUMP: Dumping (Pass III) [directories] DUMP: Dumping (Pass IV) [regular files] DUMP: 175614 blocks (85.75MB) on 1 volume at 2731 KB/sec DUMP: DUMP IS DONE
global# umount /mnt
global# fssnap -d /dev/fssnap/0
Note that the snapshot is also removed from the system when the system is rebooted.
To create the role and assign the role to a user, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.
global# cd /
global# find export/my-zone -fstype lofs -prune -o -local | cpio -oc -O /backup/my-zone.cpio type as one line
global# ls -l backup/my-zone.cpio
You will see a display similar to the following:
-rwxr-xr-x 1 root root 99680256 Aug 10 16:13 backup/my-zone.cpio
You should create backup files of your non-global zone configurations. You can use the backups to recreate the zones later, if necessary. Create the copy of the zone's configuration after you have logged in to the zone for the first time and have responded to the sysidtool questions. This procedure uses a zone named my-zone and a backup file named my-zone.config to illustrate the process.
To create the role and assign the role to a user, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.
global# zonecfg -z my-zone export > my-zone.config