Escolar Documentos
Profissional Documentos
Cultura Documentos
Recovery
Zero to Sun ZFS Storage Appliance Backup and
Recovery in 60 Minutes
ORACLE HANDS ON LAB
Table of Contents
Lab Overview
Environment Start Up
defined.
Why BUI Usage
Preparation Work
Create Project
9
9
10
11
11
13
14
14
14
15
17
18
18
19
20
21
How to backup file systems to ZFS disk with NDMP via Oracle Secure Backup
21
21
Perform a Backup
22
22
22
24
24
24
Perform a backup
24
26
27
Lab Overview
We want to show backup to ZFS SA, replicate to another datacenter, and use NDMP to
back up to ZFS SA Disk.
This lab will take you through 3 basic steps.
1. We will protect data to disk using replication and backup.
2. Then damage or change the data
3. Recover data from disk using the remote replica and the backup.
While the lab is not meant to be an exhaustive lab for any single product along the way
for those 3 steps we have tried to let the user spend time getting their hands dirty with the
primary products used for backup and recovery, Oracle Secure Backup, NDMP,
Replication and ZFS Storage Appliance.
During this lab you will use 3 Virtual Box VMs: HOL1773-ZBA-01 and HOL1773-ZBA-02,
HOL1773-OSB-01.
ZBA-01 is your primary source disk using the ZFS Storage Appliance
ZBA-02 is your secondary remote target disk using the ZFS Storage Appliance
OSB-01 is our Oracle Secure Backup machine using NDMP to backup to ZFS Storage
Appliance Disk.
VM NAME
SHORT NAME
LONG NAME
IP ADDRESS
HOL1773-OSB-01
HOL1773-ZFS-01
HOL1773-ZFS-02
solaris
zba-01
zba-02
solaris-node-1
zba-01.hol.com
zba-02.hol.com
192.168.56.60
192.168.56.70
192.168.56.80
1 |
Environment Start Up
The environment may or may not be already running when you sit to do the lab. The
following steps show how to start the virtual machines if they are not already running. If
there are any other virtual machines running that are not show below please close them
for the best possible hands-on lab experience. The three virtual machines used in the
lab are shown in the following diagram.
Sun ZFS Storage Appliance setup process
Initial Setup for Sun ZFS Storage Appliance Simulator
These steps were performed for you before the lab or can be done on your own if you
are building the lab later on.
First you have to download he Sun ZFS Storage Appliance Simulator and import it to
Virtual Box. Exact downloading instructions for these steps change from time to time
and are not covered in this hands on lab for that reason. The simulator comes with
great documentation on how to download and import the appliance into Virtual Box and
can be found by searching for Sun ZFS Simulator on Oracle.com.
Start all three Virtual Machines
If not done already start the virtual machine HOL1773-ZFS-01 and HOL1773-ZFS-02
first and as last the HOL1773-OSB-01
Step 1. Start Virtual Box Manager
Step 2. Highlight the HOL1773-ZFS-01 and click the start arrow.
Step 3. Highlight the HOL1773-ZFS-02 and click the start arrow.
Step 4. Highlight the HOL1773-OSB-01 and click the start arrow.
Step 5. Be patient, this might take a few minutes, please wait to see three login prompts.
From this point forward you will configure the appliance via the BUI in Firefox. You will
not need the command line interface any more.
Click on the ZBA-01. It might be that your browser complains about a non-secure site or
unsupported browser, just continue. The ZFS Storage Appliance is already preconfigured and ready for use.
Login here with:
User: root
Password: welcome1
One important thing to remember is how to get out of the VMs with RIGHT-CTRL click.
Preparation Work
Create Project
NOTE:
We have now successfully created a new Project named Project-A, we are going to
create a share within this Project in the next four steps.
Create Share
Step 1. Click on the project named: Project-A, you should see this screen:
NOTE:
We have finished the preparation work and we are ready to create the replication in the
next chapter.
Mount your share on Solaris and write some files
NOTE:
Notice the Target and Pool are already filled in automatically.
We have some options here play around with the possibilities like On-Demand,
Scheduled or Continuous. Default the Replication stream will be compressed.
Step 6. Click on Continuous and press the ADD button.
You see the Target is green and the Status on Continuous, which is good:
NOTE:
You have successfully managed to setup a continuous replicated SHARE, to see it work
go to the second ZBA-02 via your browser via the 2nd TAB within Firefox:
Step 1. Goto https://192.168.56.80:215 main menu (ZBA-02)
Step 2. Click on Shares (top view)
Step 3. Click on Projects (left side)
Step 4. Click on All and then on zba-01: Project-A (left side)
Step 5. Click on Replication (screen middle)
Here you see the remote started Project which is replicated to this unit.
Step 2. Notice the NFS share MyShare01 is not working any longer.
Step 3. Start a terminal session (see top bar)
Step 4. Try to list the files in /mnt, by typing the following:
$ sudo ls -ltr /mnt
You will see that the session is hanging. Which confirms the share is unavailable.
Step 5. Use CTRL-C to stop the command.
Step 6. Stop the mount to the not working ZFS share by typing:
$ sudo umount -f /mnt
NOTE: We are now going to promote the second appliance with the replicated share.
Step 1. Go to the /mnt mount point and move some files so we can see the changes
later on when we are back on ZBA-01.
$ sudo su $ cd /mnt
$ mkdir updated
$ mv file-* updated
$ du a
$ exit
Switch directions of replication back to ZBA-01
NOTE:
After the role-reversal, the replication is automatically set to manual mode. The mode
is not automatically changed to continuous - since the primary site can be in an
unavailable state.
Step 12. Click on the two arrows in front of Sync Now.
Wait until it says Synced.
Then youll see the following:
Now you see the old Project-A has lost the share and is moved to DR-Project-A
Step 16. Click on zba02: DR-Project-A
Step 17. Click on Replication
Step 18. Click on Reverse Direction of Replication
Step 19. You are asked for a new name use Project-A-new. Press OK
NOTE:
After the role-reversal, the replication is automatically set to manual mode. The mode
is not automatically changed to continuous.
It might be that you notice some errors in this Virtual ZFS Storage VM the error causes
firefox to stop working, if this happens please restart firefox at this point.
(TIP: hard kill #pkill firefox from terminal)
Check new content after switching directions.
NOTE:
Congratulations. You have successfully managed to switch replicated directions. We
have showed this now with only a single share, but you can imagine this works the same
for all shares and luns. Working with projects is therefore important.
Step 9. You should be able to check on the ZBA-02 under Shares, Projects (left side),
Replica, zba-01:solaris-servers, LUNS the creation remotely of the Project
MySolarisLun01.
NOTE:
If you need to restore this lun, the same steps are taken as in the previous switch Switch
directions of replication back to ZBA-01 on page 13. We do not do this now because of
limited time we have for this LAB. If you have some time left over and the end, we
challenge you perform the reverse replication for MySolarisLun01.
Backup the ZFSSA configuration, save to NFS share on the array and replicate it to the
second array
Save ZFS Appliance configuration files
Password : welcome1
Step 5. Click on the power button to Enabled the service.
The NDMP led will turn into green and the service goes Online
How to backup file systems to ZFS disk with NDMP via Oracle Secure Backup
Create Backup Dataset
NOTE:
We use for this lab OSB which stands for Oracle Secure Backup tool. First we have
created a backup dataset so this has already been prepared for you:
An Oracle Technical White Paper June 2016:
NDMP Implementation Guide for the Oracle ZFS Storage Appliance (white paper)
On the Solaris host we already created the ZFS SA zba-01 as a NDMP Mediaserver for
OSB named as zba-01-dump. We created this as follows:
ob> mkhost -a ndmp -o -r mediaserver,client -i 192.168.56.70 -u zba01 -B dump -q zba-01-dump
ob> catds mnt.ds
include host solaris-node-1
include path /export/MyBackupShare
ob> lsdev --long disk pool
disk:
Device type:
disk pool
In service:
yes
Debug mode:
no
Capacity:
(not set)
Consumption:
9.8 MB
Free space goal:
(system default)
Concurrent jobs:
25
Blocking factor:
(default)
Max blocking factor: (default)
UUID:
860c5fe0-23e0-1033-8dd5-f404d058a767
Attachment 1:
Host:
zba-01
Directory:
/export/store/solaris
Perform a Backup
Step 7. Go back to obtool and start the filesystem dump restore for docs only :
$ obtool
ob> set host solaris-node-1
ob> cd /export/MyBackupShare
ob> ls
file-1 file-02 file-03 file-04 etc
ob> logout
Step 9. Go back to your terminal and check the mount point again:
#sudo ls ltr /export/MyBackupShare
Files should be back in place.
Step 10. Unmount /mnt:
$ sudo umount /export/MyBackupShare
NOTE:
On the ZBA-01 we have created a lun in Project-A named MySolarisLun01.
On the Solaris host we created Backup Dataset named MyLunBackup.
ob> mkds MyLunBackup.ds
$ Begin dataset TEMPLATES/new_button.
include host solaris-node-1
include path /iscsi-demo/Files
$ End dataset TEMPLATES/new_button.
ob> mkhost -a ndmp -o -r mediaserver,client -i 192.168.56.70 -u admin -B zfs q aie7000-zfs
NOTE:
We already have created a LUN in project-A named MySolarisLun01, and we have
placed some files on it. In chapter Adding Lun Step 1 to 11. If you have skipped those
steps, you can now run the command ./create_zpool.
Step 1. List files:
$ sudo ls -ltr /iscsi-demo/Files
Step 2. Add more files to the folder:
$ cd /iscsi-demo/Files
$ ls -l
$ sudo tar xvf /install/lundata.tar
$ sudo ls -ltr
Perform a backup
NOTE:
The logging will look like this:
ob> backup -D MyLunBackup.ds -l 0 --go
Info: backup request 1 (dataset MyLunBackup.ds) submitted; job id is admin/30.
ob> lsj
Job ID
Sched time Contents
State
---------------- ----------- ------------------------------ --------------------------------------admin/30
none
dataset MyLunBackup.ds
processed; host backup(s)
scheduled
admin/30.1
none
backup zba-01-zfs
running since 2016/08/14.09:03
ob> lsj --log admin/30
Job ID
Sched time Contents
State
---------------- ----------- ------------------------------ --------------------------------------admin/30
none
dataset MyLunBackup.ds
completed with warnings at
2016/08/14.09:04 - one or more warnings or non-critical errors reported
2016/08/14.09:03:22 Dataset processed; host backups scheduled.
2016/08/14.09:04:35 Job completed with warnings.
You have successfully completed the iscsi LUN backup via NDMP method on the
ZFS Appliance. Now we are going to destroy the LUN first and then restoring it back.
Step 4. After the successful restore, check in ZBA-01 if the LUN restored?
Step 5. OPTIONAL: only with new lun. (see Note above)
Scan the new iscsi disks MySolarisLun01:
$ sudo svcadm restart svc:/network/iscsi/initiator:default
Step 6. OPTIONAL: only with delete and restored LUN.
Fix zpool with restored LUN
$ sudo zpool clear iscsi-demo
Step 7. Go back to your folder and check if all the files are there again?
$ sudo ls ltr /iscsi-demo/Files
If you see the files, the exercise is completed.
NOTE:
Congratulations. You have completed the Hands On Lab.
You are now able to configure shares and LUNs on ZFS Appliances and starting
replications to a second side. You also are able to backup and restore using Oracle
Secure Backup tooling which is the preferred backup application from Oracle.
Thank you for joining the lab and good luck in the future using the product.
Worldwide Inquiries
Phone: +1.650.506.7000
Fax: +1.650.506.7200
CONNECT W ITH US
blogs.oracle.com/oracle
twitter.com/oracle
Copyright 2014, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only, and the
contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other
warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or
fitness for a particular purpose. We specifically disclaim any liability with respect to this document, and no contractual obligations are
formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means,
electronic or mechanical, for any purpose, without our prior written permission.
oracle.com
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
facebook.com/oracle
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and
are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are
trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. 0916