You are on page 1of 26

SnapCreator Installation and Administration Guide v3.

Professional Services Germany Keith Tenzer Professional Services Consultant keith.tenzer@netapp.com Rapid Response Engineering Alfredo Quiroga Engineer alfredo.quiroga@netapp.com

SnapCreator Installation and Administration Guide v3.1

Table of Contents
1 Summary ............................................................................................................................................3 2 Features..............................................................................................................................................3 3 Security ..............................................................................................................................................4 4 Backup Process ................................................................................................................................4 5 SnapCreator Policies ........................................................................................................................5 6 Installation of SnapCreator ..............................................................................................................5 7 Installation of SnapCreator GUI (not required) ..............................................................................6 8 Configuring SnapCreator .................................................................................................................7 9 Running SnapCreator .....................................................................................................................17 10 SnapCreator Examples ...................................................................................................................19 11 Troubleshooting ..............................................................................................................................22 12 Software / Right of Use ...................................................................................................................24 13 Further Questions/Help? ................................................................................................................25 14 Appendix A: SnapCreator Architecture Diagram.........................................................................26

SnapCreator Installation and Administration Guide v3.1

Summary

The purpose of SnapCreator is to provide a central framework where Integration of NetApp Snapshot technology and Applications that do not have SnapManager products is seamless to our customers. Normally this requires a custom script that would then interface with the Application and the NetApp Storage. These customs scripts are written every day over and over, so when you get down to the purpose of SnapCreator, it is to save time and provide our customers with the best most reliable solution possible. The Application piece is usually unique and there is no Code in SnapCreator to specifically handle Application Consistency, instead there is a framework where you can Integrate Application Consistency (Backup) scripts into SnapCreator or use the already built-in SnapCreator modules. There are currently six Application modules available for SnapCreator with more on the way: Oracle, MaxDB, MySQL, Lotus Notes, DB2, and Sybase (unix only). SnapCreator handles communicating with NetApp Storage and performs various tasks which include policy based snapshot management (via API or SnapDrive), an optional Lun or Volume clone, seamless integration with SnapMirror / SnapVault, and integration with Operations Manager / Protection Manager. SnapCreator is by no means a replacement for our SnapManager and SnapDrive Products in fact as you will see later it can be used to integrate with both SnapManager and SnapDrive products.

Features
Java GUI based on NetApp Web Framework (NWF) Integration with SnapDrive Integration with the following NetApp technologies through ZAPI: Snapshots, SnapVault, SnapMirror, Lun Cloning, Volume Cloning, and IGROUP mapping Integration modules for Oracle, MaxDB, MySQL, Lotus Notes, DB2, and Sybase Integration with any Application or Database that runs in open systems environment, you have to write the Application Backup Script or module if one doesnt exist Integration with NetBackup, CommVault, or any Backup software with cli commands Ability to configure multiple Snaphot / SnapVault policies with different retentions Both Snapshot and SnapVault policies are managed from SnapCreator You can create and manage Snapshots and SnapVault retentions across multiple volumes and Storage Controllers Support for Volume and Qtree SnapMirror Support for FAS and VFiler Support Consistency Groups, ie: consistent snapshots across multiple volumes/filers Support of 1 to 1, fan-in, and fan-out SnapMirror / SnapVault relationships Support cascading SnapMirror snapshot->snapvault->snapmirror A dynamic configuration file where users can pass in their own User Defined values, gives one the ability to integrate with other products such as SnapDrive and NetBackup Granular error logging and the ability to send error messages out via email or other tools Integration with Operations Manager, ability to create events in Operations Manager Integration with Protection Manager, SnapCreator backups can be registered in PM Integration with Open Systems SnapVault (OSSV) Allows for password scrambling so clear text passwords arent saved in config file Both volume and file restore are supported but without direct application integration

In order to get a quick idea of if SnapCreator can help you, below is a list of its features:

What Does SnapCreator not do: SnapCreator is not a replacement for Snap Manager products Mounting of cloned luns is not directly handled by SnapCreator, mount script or SnapDrive needed Does Not create or manage SnapVault and SnapMirror relationships, one should look at using Protection Manager for that

SnapCreator Installation and Administration Guide v3.1

Security

In order to communicate with NetApp Storage Controller(s) a username and password is needed. Passwords can be protected so they are not saved in clear text. SnapCreator does use and support NetApp RBAC so it is recommended to create a backup user that only has the necessary api permissions and not use root. Network communications are done through HTTP (80) or HTTPS (443) so you need to have one or both of those ports open from the host where SnapCreator runs to the NetApp Storage Controller(s). The user used to authenticate needs to be created on the NetApp Storage Controller(s) as well. In the case of HTTPS, make sure it is enabled and configured on the NetApp Storage Controller(s).

Backup Process

The process for doing a backup is always the same regardless of what application we are talking about. First we achieve Application Consistency, then File System (optional), we take a NetApp snapshot, return the application to normal mode, perhaps clone the lun or volume (optional), perform various SnapMirror or SnapVault functions (optional), and lastly delete old NetApp snapshots thus managing retention policies on both primary and secondary storage in the case of SnapVault or SnapMirror. In SnapCreator there is opportunity at each step to run optional scripts or commands. These scripts or commands are triggered using PRE and POST command parameters in the config file and is the heart of the integration framework. You can have 1-9 over every type of PRE or POST command. You can also have 1-9 Application backup start/stop commands. For a detailed process flowchart diagram see appendix A. 4.1 Application Backup Start/Stop Commands Commands or scripts that place an Application into backup mode in the case of START and take an Application out of hot backup mode in case of STOP. You can have between 1-9 commands. These commands are used to achieve application consistency when not using SnapCreator modules. NetApp snapshots done on volumes without application consistency are crash consistent only. 4.2 Archive Commands Archive commands are user defined commands or scripts (optional) which run before the NetApp Post commands (last command that runs). You can have between 1-9 commands. The purpose of the archive commands is to give one the opportunity to interface with archiving tools after a backup occurs. 4.3 PRE Commands PRE commands are user defined commands or scripts (optional) which run before the Application backup start command, The NetApp ZAPI or SnapDrive calls, the Application backup stop command, the volume or lun clone cleanup, and before the script exits due to a failure. You can have between 1-9 of each type of PRE command. The types of PRE commands are as follows: PRE Application backup start command(s), PRE NetApp Command(s), PRE Application backup stop command(s), PRE NetApp clone delete command(s), PRE Exit command(s), and PRE Restore command(s) in the case of interactive restore. An example of a PRE command would be running a file system sync, or consistency check before NetApp calls using ZAPI or SnapDrive are made. In this example I would run that file system command or script as a PRE NetApp command. 4.4 POST Commands POST commands are user defined commands or scripts (optional) which run after the Application backup start command, The NetApp ZAPI calls, and the Application backup stop command. You can have between 1-9 of each type of POST command. The types of POST commands are as follows: POST Application backup start command(s), POST NetApp Command(s) (last thing script does), POST Application backup stop command(s), POST Data Transfer command(s), POST Restore command(s) in the case of interactive restore. An example of a POST command would be running a database check after the Application backup stop command has run to

SnapCreator Installation and Administration Guide v3.1

ensure the database is running in normal mode. In this example I would run that database check command
or script as a POST Application backup stop command.

4.5 Connect to NetApp Storage For every primary or secondary NetApp Storage Controller specified we make a connection using ZAPI over HTTP or HTTPS. This connection is made using a user that exists on the NetApp Storage Controller and that user is only granted HTTP login and API roles, meaning the user has no permission to do anything outside of ZAPI. Of course root works but that would not be recommended for obvious reasons. 4.6 NetApp Storage ZAPI Calls SnapCreator has the ability to create a NetApp snapshot of on one or more volumes (primary), Lun or Volume Clone of snapshot, Map Igroups to cloned Luns, SnapMirror update of one or more volumes (secondary), SnapVault update of one or more volumes (secondary), Snapshot rename of the recent snapshot (SnapVault secondary only), Snapshot delete of one or more snapshots based on retention policy (SnapVault secondary only), Snapshot rename of the recent snapshot (primary), Snapshot delete of one or more snapshots based on retention policy (primary), and of course deleting volume or lun clones. For example you could have 3 volumes: vol1, vol2, and vol3. SnapCreator can handle taking regular snapshots of vol1, vol2, vol3 (primary) and do a SnapVault update on vol2 as well as do a SnapMirror update on vol3. Since SnapVault retentions (secondary) are different than normal snapshot retentions (primary), SnapCreator can handle a different retention for primary and secondary storage as well as various Policies which will be covered later. This is a huge advantage because it gets us away from our backup scripts being out of sync with SnapVault schedules on the NetApp Storage Controller. We do not need to configure SnapVault schedules with SnapCreator. This also gives us an end-to-end process dependent on a single schedule for any application.

SnapCreator Policies

Policies are user defined snapshot retentions which can apply to snapshots on primary storage and also SnapVault snapshots on secondary storage. It is required to at a minimum define one policy in the NTAP_SNAPSHOT_RETENTIONS configuration parameter explained later. This is the number of snapshots you want to keep. You can also (optional) specify a maximum snapshot age so even if we exceed the number of snapshots, they will only be deleted if the snapshots are older than the maximum age. In the case of SnapVault one has the ability to associate the same policy with different SnapVault retentions. For example if I want to create daily snapshots and retain them for 7 days on primary storage and 1 month on secondary storage I would do the following: NTAP_SNAPSHOT_RETENTIONS=daily:7 NTAP_SNAPVAULT_RETENTIONS=daily:28 I can also specify a minimum snapshot age (days) to ensure snapshots will only be deleted if they are older than the maximum age regardless of how many snapshot exist in a give volume. Using above example of 7 days for snapshots and 30 days for SnapVault snapshots I would do the following: NTAP_SNAPSHOT_RETENTION_AGE=7 NTAP_SNAPVAULT_RETENTION_AGE=28 This is a very simple example, one can of course define as many policies as desired but each time SnapCreator is run, it can only use one policy. Also, the maximum age value is global so it applies to all policies. If I wanted in addition a weekly policy I would configure it and then call SnapCreator once a week via cron or task manager with the Snap Type of weekly.

Installation of SnapCreator

SnapCreator is designed to run on any open systems platform. The installation process is very simple and is as follows:

SnapCreator Installation and Administration Guide v3.1

6.1 Extract zip file I would extract the zip file under /usr/local (unix) or C:\ on Windows. On Windows I strongly recommend not having spaces in the install path, for example Program Files. 6.2 Copy correct binary to SnapCreator root directory

The SnapCreator distribution contains binaries for Windows, Solaris, Linux, and AIX. The binaries are located under the /path/to/snapcreator_v<#>/bin/<os> directory. Copy the correct binary from /path/to/snapcreator_v<#>/bin/<os> to /path/to/snapcreator_v<#>. Note: if youre OS is not available with the distribution you can request a compiled version by sending email to dl-snapcreator@netapp.com (internal) or making request through a NetApp Sales Representative.

6.3 Running SnapCreator Setup SnapCreator setup will configure an admin user for the GUI, set up parameters for the GUI, and also setup parameters for the SnapCreator scripts located under the mods directory:
./snapcreator --config setup Note: Starting with SnapCreator 3.1, the application scripts are no longer required, SnapCreator now uses modular classes located under /path/to/snapcreator_v<#>/netapp/SnapCreator/MOD. These modules are enabled via the APP_NAME parameter explained later.

6.4 Create ZAPI User Since SnapCreator uses ZAPI it is required to create a user on the NetApp Storage Controller which has the necessary access. It is also important that this user only have the access which it requires. It is recommended that you create a new role, group, and user so you can control access and lock the SnapCreator user down. A user needs to be created on all NetApp fillers involved (primary and secondary in the case of SnapMirror or SnapVault) but depending on the storage controllers function, not all roles are needed. Below are the possible roles that SnapCreator may require: login-* (for all login access) or login-http-admin (to only allow API login) api-snapshot-* (always required) api-system-* (always required) api-ems-* (always required) api-snapvault-* (required only for SnapVault management) api-snapmirror-* (required only for SnapMirror management) api-volume-* (required for Volume Clones)
api-lun-* (required for Volume and Lun Clones) api-cg-* (required for Consistency Group Snapshots)

Installation of SnapCreator GUI (not required)

The SnapCreator GUI is based on Java and uses the NetApp Web Framework (NWF). You should be able to use any browser, we have tested IE and Mozilla. The GUI uses jetty which is an imbedded Java application server. The GUI is not required but rather a complimentary tool for helping build, manage, and run SnapCreator configuration profiles.

7.1

GUI Requirements

Java Runtime (JRE) 1.6 or higher is installed on the system running SnapCreator It is recommended to download the Java JRE from here: http://www.java.com/en/download/manual.jsp On Unix the bash shell needs to be installed under /bin/bash, if it not make a soft symlink pointing /bin/bash to wherever bash is installed

SnapCreator Installation and Administration Guide v3.1

7.2

GUI Setup Unix

The following environment variables need to be set or verified: export JETTY_HOME=/path/to/snapcreator_v<#>/gui/jetty.x.x.x export JAVA_HOME=/path/to/java The following parameters need to be set in the snapcreatorgui.conf located under /path/to/snapcreator_v<#>/gui/jetty.x.x.x/etc/snapcreatorgui.conf for unix: SNAPCREATOR_PATH=/path/to/snapcreator_v<#> SNAPCREATOR_EXEC=/path/to/snapcreator_v<#>/snapcreator SNAPCREATOR_USER=<username> SNAPCREATOR_PASS=<encrypted password> Note: The snapcreatorgui.conf settings should automatically be set after running ./snapcreator --config setup Once the above is configured you can start and stop the GUI with the following command: /path/to/snapcreator_v<#>/gui/jetty.x.x.x/bin/jetty.sh start /path/to/snapcreator_v<#>/gui/jetty.x.x.x/bin/jetty.sh stop Once Jetty is running you can access the SnapCreator GUI over http as follows: http://myserver.mydomain.com:8080

7.3

GUI Setup Windows

The following parameters need to be set in the snapcreatorgui.conf located under /path/to/snapcreator_v<#>/gui/jetty.x.x.x/bin/etc/snapcreatorgui.conf for windows: SNAPCREATOR_PATH=/path/to/snapcreator_v<#> SNAPCREATOR_EXEC=/path/to/snapcreator_v<#>/snapcreator.exe SNAPCREATOR_USER=<username> SNAPCREATOR_PASS=<encrypted password> To install the jetty service run the following command: /path/to/snapcreator_v<#>/gui/jetty.x.x.x/bin/jetty-service.exe -i jetty-service.conf Note: This will create a service called Jetty-6-Service which you can start/stop under control panel If you want to remove the jetty service on Windows run: /path/to/snapcreator_v<#>/gui/jetty.x.x.x/bin/jetty-service.exe -r jetty-service.conf Once Jetty is running you can access the SnapCreator GUI over http as follows: http://myserver.mydomain.com:8080/snapcreator/index.html Out of the box the GUI will use port 8080 so make sure that port is open from your client to the system running SnapCreator.

Configuring SnapCreator

The configuration of SnapCreator is intended to be simple and everything occurs in your config file located under /path/to/snapcreator_v<#>/configs/<profile>/<config>.conf. The configuration file is dynamic meaning you can create and set variables within the configuration itself using % to reference a value. You can have more than one configuration, actually you can have as many as you want but each time SnapCreator is run, it uses only one configuration. SnapCreator should be scheduled through cron (unix) or task manager (windows). You can edit this file with vi (unix) or whatever you like on windows. In addition you can use the SnapCreator GUI to edit and manage configuration files. The configuration file is divided into four sections Basic Configuration, NetApp Options, Other Options, and Additional Modules. Most of the options are optional and below is an explanation of what they are and what they do:

SnapCreator Installation and Administration Guide v3.1

8.1 Create a Configuration File (cli) First create a new directory for your configuration under /path/to/snapcreator_v<#>/configs. I would name it after the host or application you are backing up. Whatever name you chose, it is required that the configuration file also have the same name. In my example I will chose the name oraprod01. The default template is located under /path/to/snapcreator_<#>/configs/default/default.conf. Create Directory mkdir /path/to/snapcreator_v<#>/configs/oraprod01 Copy/Rename default template to your new configuration directory cp /path/to/snapcreator_v<#>/configs/default/default.conf
/path/to/snapcreator_v<#>/configs/oraprod01/oraprod01.conf

Edit your configuration file


Using vi in unix or whatever text editor you have in Windows you can now edit your new configurations. The GUI makes things much easier so if you havent tried the GUI please try it first before editing things manually.

8.2

Create a Configuration File (GUI)

First open a web browser to the following URL: http://myserver.mydomain.com:8080

Create Profile
You will be asked for login information which you setup when you ran ./snapcreator config setup. Once you are logged in under Management->Configurations you will see an Add Profile button. Please create a new profile, you can call it whatever you want but the name should have something to do with the application being backed up. Adding a profile simply creates a directory under the /path/to/snapcreator_v<#>/configs directory.

Run the GUI Configuration Wizard


Once the profile has been created you can right click on the profile and select New Configuration which starts the Configuration Wizard and will guide you through creating a SnapCreator configuration for the given profile. You can also rename and delete a configuration by right clicking and selecting Delete or Rename. The GUI simply creates the same configuration files you would create using the cli. So you can update and edit configuration files created by the GUI from the cli or visa versa.

8.3 Referencing Referencing is the ability to define variables within the configuration file. This is done by using the % character. A perfect example of this is when you want to use SnapDrive to create the snapshots instead of ZAPI. Since the snapshot names need to be unique, being able to set a dynamic variable is required. Below is an example from a Windows SnapDrive config, again pay attention to the /: NTAP_SNAPSHOT_CREATE_CMD1="c:/Program Files/NetApp/SnapDrive/sdcli" snap create -m fx1b4 s %SNAME-%SNAP_TYPE-%SNAP_TIME_recent -D E: Built in Variables that can be referenced: %SNAP_TYPE This is given when you run SnapCreator and is your retention policy ie: daily, weekly, monthly %SNAP_TIME This is a timestamp (YYYYMMDDhhmmss) used in the naming of snapshots to create a guaranteed unique name for every snapshot. It is also used to name the backup reports and in the case of Sybase can be used to name the Sybase Transaction Logs. %ACTION This is the given action when you run SnapCreator (snap|clone_vol|clone_lun|arch|restore|delete|snaplist|clonelist|pmsetup|pwd)

SnapCreator Installation and Administration Guide v3.1

%MSG Used to send an error message to another program such as email or Tivoli. Can only be used with the SENDTRAP function. %USER_DEFINED - Passes a user defined argument to the SnapCreator config file. A good example would be in order to integrate with a backup application like NetBackup, you may need to pass into configuration file the NetBackup schedule desired in the case where you have multiple schedules and want to call NetBackup with a certain schedule. This could also be achieved by having multiple configuration files for the different scenarios. Note: when combining variables in the SnapCreator configuration file (%SNAME-%SNAP_TYPE%SNAP_TIME_recent) one should always use the - as a separator between the variables just like in the above SnapDrive example. 8.4 Basic Configuration SNAME (REQUIRED) - Your snapshot naming convention should be unique, snapshots on NetApp will be deleted according to the naming convention and Retention Policy used SNAP_TIMESTAMP_ONLY (REQUIRED) (Y|N) If set to Y snapshots will end with YYYYMMDDHHMMSS otherwise new snapshots will be _recent and they will get renamed to end with YYYYMMDDHHMMSS. VOLUMES (REQUIRED) - List of filers and volumes you want to snapshot ie: filer1:vol1,vol2,vol3;filer2:vol1;filer3:vol2,vol3 VFILERS List of vfilers and their hosting filer/volumes ie: vfiler1@filer1:vol1,vol2,vol3;vfiler2@filer2:vol1;vfiler3@filer3:vol2,vol3 SNAPMIROR_VOLUMES - List of filers and volumes you want to perform a SnapMirror update on ie: filer1:vol1,vol2,vol3;filer2:vol1;filer3:vol2,vol3 SNAPMIRROR_CASCADING_VOLUMES List of SnapVault destination filers and volumes where after a SnapVault update you want to perform a SnapMirror update ie: sec-filer1:vol1-sec,vol2-sec SNAPVAULT_VOLUMES - List of filers and volumes you want to perform a SnapVault update on ie: filer1:vol1,vol2,vol3;filer2:vol1;filer3:vol2,vol3 Note: In order for SnapVault and SnapMirror updates to work the relationships need to exist, SnapCreator will not create the relationships. Note: The hostname(s) in the SnapMirror or SnapVault relationship must be the same as specified in the VOLUMES, SNAPMIRROR_VOLUMES, and SNAPVAULT_VOLUMES options and the host where SnapCreator runs must be able to resolve the hostname(s). Note: Hostnames should be the short hostname (name that appears on storage controller command prompt) not the FQDN NTAP_USERS (REQUIRED) - List of filers and their corresponding usernames/passwords ie: filer1:joe/password1;filer2:bob/password2;filer3:ken/password3 Note: if you want to use protected passwords first run ./snapcreator --cryptpasswd and then save the scrambled password in the config file. NTAP_PWD_PROTECTION (REQUIRED) (Y|N) Setting which enables password protection, you must encrypt passwords and save encrypted password in config when this option is set to Y

SnapCreator Installation and Administration Guide v3.1

TRANSPORT (REQUIRED) - (HTTP|HTTPS) Allows you to choose which protocol to use for API communications Note: HTTPS requires openssl-devel rpm and has only at the moment been tested with Linux and AIX PORT (REQUIRED) The port you want to use to communicate with the NetApp Storage Controller(s) normally (80|443) MANAGEMENT_INTERFACES For every physical filer you can specify an interface for management. All ZAPI communications between SnapCreator and the filer will go over this interface. ie: MANAGEMENT_INTERFACES=filer1:filer1-mgmt;filer2:filer2-mgmt SECONDARY_INTERFACES For every filer or vfiler you can specify a secondary interface source/destination pair (name or ip) which will be used for SnapMirror and SnapVault updates. ie: filer1:filer1-backup/filer2-backup filer1 Filer or VFiler Name filer1-backup Secondary Interface for filer1/vfiler1 filer2-backup Secondary Interface for filer1/vfiler1s SnapMirror or SnapVault destination Note: The SnapVault/SnapMirror relationships need to be configured to use this secondary interface, SnapCreator does not manage snapmirror/snapvault relationships. LOG_NUM (REQUIRED) - The number of .debug and .out reports for SnapCreator to keep 8.5 NetApp Options SNAPDRIVE (Y|N) Setting which allows you to use SnapDrive instead of ZAPI for snapshot creation NTAP_SNAPSHOT_DISABLE (Y|N) Setting which tells SnapCreator to not take a snapshot. The idea of this option is that SnapCreator can handle SnapVault or SnapMirror for SnapManager. In order for that to work the SnapManager snapshots need to follow this naming convention <snapshot name><policy>_recent NTAP_SNAPSHOT_CREATE_CMD<#> - SnapDrive(s) command to create a snapshot and flush the file system buffers where "#" is a number 1-9. Note: This is required if you enable SNAPDRIVE, ZAPI will still be used to do everything else but SNAPDRIVE will create snapshots NTAP_SNAPSHOT_RETENTIONS (REQUIRED) - Setting which determines the number of NetApp snapshots you want to retain for a given policy ie: daily:7,weekly:4,monthly:1 NTAP_SNAPVAULT_RETENTIONS - Setting which determines the number of NetApp snapshots on the SnapVault secondary you want to retain for a given policy ie: daily:21,weekly:12,monthly:3 NTAP_SNAPSHOT_RETENTION_AGE - Setting in (days) which allows you to define a retention age for snapshots. If configured snapshots will only be deleted if there are more than defined in SNAPSHOT Retentions and if they are older than retention age (days) NTAP_SNAPVAULT_RETENTION_AGE - Setting in (days) which allows you to define a retention age for SnapVault snapshots. If configured SnapVault snapshots will only be deleted if there are more than defined in SNAPVAULT Retentions and if they are older than retention age (days)

10

SnapCreator Installation and Administration Guide v3.1

NTAP_SNAPSHOT_NODELETE (Y|N) Setting which will override NTAP_SNAPSHOT_RETENTIONS and ensure no snapshots are deleted, leaving this on can cause your NetApp volume to fill up NTAP_SNAPVAULT_NODELETE (Y|N) Setting which will override NTAP_SNAPVAULT_RETENTIONS and ensure no snapshots are deleted, leaving this on can cause your NetApp volume to fill up NTAP_SNAPMIRROR_UPDATE - (Y|N) Setting which allows you to turn off and on the SnapMirror update function NTAP_SNAPMIRROR_CASCADING_UPDATE (Y|N) Setting which allows you to turn off and on the Cascading SnapMirror update function, this is a SnapMirror update using a SnapVault destination volume NTAP_SNAPVAULT_UPDATE - (Y|N) Setting which allows you to turn off and on the SnapVault update function NTAP_PM_UPDATE (Y|N) Setting which allows you to turn off and on the Protection Manager update which will register SnapCreator snapshot(s) in Protection Manager Note: If NTAP_PM_UPDATE is enabled you must configure NTAP_DFM_DATA_SET NTAP_SNAPVAULT_WAIT - Time in minutes where we will wait for SnapVault update process to complete before taking a snapshot on the SnapVault secondary NTAP_SNAPMIRROR_WAIT - Time in minutes where we will wait for SnapMirror update process to complete before creating a clone on the SnapMirror Destination. If NTAP_CLONE_SECONDARY=Y SnapCreator will wait until the SnapMirror update is complete before proceeding forward. Note: Can only be used in conjunction with NTAP_CLONE_SECONDARY and ACTION clone_vol (only volume clones are currently supported) NTAP_SNAPMIRROR_USE_SNAPSHOT (Y|N) If enabled the SnapMirror update will use the newly created snapshot, thus creating a snapshot on the SnapMirror destination Note: Required for NTAP_CLONE_SECONDARY, since in order to create a clone on the SnapMirror destination we need a snapshot NTAP_SNAPVAULT_MAX_TRANSFER Maximum bandwidth SnapVault is allowed to use in kbps, if not set SnapVault will use maximum available bandwidth NTAP_SNAPMIRROR_MAX_TRANSFER Maximum bandwidth SnapMirror is allowed to use in kbps, if not set SnapMirror will use maximum available bandwidth NTAP_VOL_CLONE_RESERVE - (none|file|volume) Space Guarantee for cloned volume NTAP_LUN_CLONE_RESERVATION (true|false) If set to true space is reserved for the cloned luns if the clone_lun Action is selected otherwise space is not reserved. NTAP_CLONE_IGROUP_MAP Specify the filer, source volume, and an IGROUP. The IGROUP is then mapped to cloned luns that reside in source volume or cloned luns that reside in volume clone.. IE: filer1:src_volume1/igroup1;filer2:src_volume2/igroup2 Note: Lun Clones will assume the same name as their parent Volume or Lun and end with _CLONE. IE: if the volume is called myvol its clone would be myvol_CLONE Note: Volume Clones will start with cl_ and end with -YYYYMMDDHHMMSS

11

SnapCreator Installation and Administration Guide v3.1

NTAP_CLONE_FOR_BACKUP (Y|N) If enabled Clones (volume and lun) will be created and then deleted after the other NetApp operations are complete, otherwise clones will be deleted before NetApp operations complete. Note: If you are backing up clones to tape this should be set to Y, if you are doing database refreshes then you will most likely want to set it to N NTAP_CLONE_SECONDARY (Y|N) If enabled clones will be created on the SnapMirror destination after the SnapMirror update finishes. Note: Must be used with NTAP_SNAPMIRROR_USE_SNAPSHOT, NTAP_SNAPMIRROR_WAIT, NTAP_CLONE_SECONDARY_VOLUMES , and ACTION clone_vol NTAP_CLONE_SECONDARY_VOLUMES A mapping of primary/secondary filers and the secondary volumes. This is required so SnapCreator can find the secondary volumes. ie: filer1:filer1-sec/vol1,vol2,vol3;filer2:filer2-sec/vol1;filer3:filer3-sec/vol2,vol3 NTAP_NUM_VOL_CLONES - # of volume clones you want to keep. This works similar to the snapshot retention policy. Note: This only works for volume clones which require a FlexClone license on the NetApp Storage Controller NTAP_DFM_DATA_SET A list of filers and Protection Manager datasets to volume correlations IE: filer1:dataset1/vol1,vol2;filer1:dataset2/vol3 NTAP_CONSISTENCY_GROUP_SNAPSHOT (Y|N) Setting which enables use of consistency groups, by using this setting you can take a consistent (IO fencing) snapshot across more than one volume across multiple Storage Controllers . Note: Enabling this options requires NTAP_CONSISTENCY_GROUP_TIMEOUT NTAP_CONSISTENCY_GROUP_TIMEOUT (urgent|medium|relaxed) Setting which controls how long we will wait for IO fencing between volumes to finish. Before we can create a consistency group snapshot all volumes must be quiesced (IO fencing). The default setting and recommendation is medium (7 seconds) however depending on how many volumes you have and how many filers are involved that may not be long enough. Urgent is 2 seconds Medium is 7 seconds Relaxed is 20 seconds NTAP_OSSV_ENABLE (Y|N) Setting which enables the Open Systems SnapVault (OSSV) integration. This option must be used in combination with the NTAP_OSSV_HOMEDIR parameter. OSSV is also required on the host running SnapCreator. NTAP_OSSV_HOMEDIR The path to the OSSV home directory IE: /usr/snapvault 8.6 Operations Manager Settings OM_HOST - Name or IP Address of the Operations Manager host OM_USER - User Name of an Operations Manager User that has permission to create events OM_PWD - Password for the above Operations Manager user OM_PORT - Port to use for communications with Operations Manager, 8080 is default http port which Operations Manager uses

12

SnapCreator Installation and Administration Guide v3.1

OM_EVENT_GENERATE (Y|N) Setting which enables or disables event creation in Operations Manager 8.7 Other Options APP_BACKUP_START_CMD<#> - Scripts or commands that put your application into backup mode where "#" is a number 1-9 You are permitted to have up to 9 APP_BACKUP_START_CMDS. Note: Ignored if you are using APP_NAME since we handle this internally in SnapCreator APP_BACKUP_STOP_CMD<#> - Scripts or commands that take your application out of backup mode where "#" is a number 1-9 You are permitted to have up to 9 APP_BACKUP_START_CMDS. Note: Ignored if you are using APP_NAME since we handle this internally in SnapCreator ARCHIVE_CMD<#> - The archive command where "#" is a number 1-9 You are permitted to have up to 9 ARCHIVE_CMDS, purpose is to handle database archiving. PRE_APP_START_CMD<#> - The pre application backup start command where # is a number 1-9. You are permitted to have up to 9 PRE_APP_START_CMDS. PRE_NTAP_CMD<#> - The pre NetApp snapshot command where # is a number 1-9. You are permitted to have up to 9 PRE_NTAP_SNAPSHOT_CMDS. Runs before all NetApp operations. PRE_APP_STOP_CMD<#> - The pre application backup stop command where # is a number 1-9. You are permitted to have up to 9 PRE_APP_STOP_CMDS. PRE_NTAP_CLONE_DELETE_CMD<#> - The pre NetApp clone delete command where # is a number 1-9. You are permitted to have up to 9 PRE_NTAP_CLONE_DELETE_CMDS. Note: Purpose of NetApp clone delete command(s) is to call a mount script or commands, so cloned Luns can be mounted for the purpose of backing up (probably to tape) PRE_EXIT_CMD<#> Optional commands that will execute after a fatal error occurs but before the script exits. This is useful for returning everything to state it was before script ran. Note: Purpose is to return an application into normal operation mode before SnapCreator exists due to an error Note: Ignored if you are using APP_NAME since we handle this internally in SnapCreator PRE_RESTORE_CMD<#> - Optional commands which can be run before you enter an interactive restore. This allows you to interact with the application being restored. Before you do you restore for example you might want to shut the application down. POST_APP_START_CMD<#> - The post application backup start command where # is a number 1-9. You are permitted to have up to 9 POST_APP_START_CMDS. . POST_NTAP_CMD<#> - The post NetApp command where # is a number 1-9. You are permitted to have up to 9 POST_NTAP_SNAPSHOT_CMDS. Runs after all NetApp operations are complete. POST_APP_STOP_CMD<#> - The post application backup stop command where # is a number 1-9. You are permitted to have up to 9 POST_APP_STOP_CMDS.

13

SnapCreator Installation and Administration Guide v3.1

POST_NTAP_DATA_TRANSFER_CMD<#> - The post data transfer command runs after SnapVault or SnapMirror transfer. Where # is a number 1-9. You are permitted to have up to 9 POST_NTAP_DATA_TRANSFER_CMDS. POST_RESTORE_CMD<#> - Optional commands which can be run after you complete an interactive restore. This allows you to interact with the application being restored. After your restore is complete you might want to start the application. NTAP_ASUP_ERROR_ENABLE (Y|N) Setting which enables SnapCreator error messages to also log an auto support message on the NetApp Storage Controller. SnapCreator will always create an info auto support message when the backup has started and completed. SENDTRAP - Command which interfaces with your monitoring software or email, allows you to pass alerts generated from SnapCreator into your own monitoring infrastructure. The %MSG variable is the message sent from SnapCreator. Below is an example of how to send email on unix system: IE: SENDTRAP=/usr/bin/mailx s %MSG myaddress@mydomain.com </dev/null SUCCESS_TRAP - Command which interfaces with your monitoring software or email, allows you to pass the success message generated from SnapCreator into your own monitoring infrastructure. The %SUCCESS_MSG variable is the success message for SnapCreator. Below is an example of how to send email on unix system: IE: SUCCESS_TRAP=/usr/bin/mailx s %SUCCESS_MSG myaddress@mydomain.com </dev/null SUCCESS_MSG - Upon SnapCreator success will log the message you define and also send it to SUCCESS_TRAP if defined or SENDTRAP, if SENDTRAP is defined 8.8 Additional Modules The idea here is to get a collection of modules for achieving application consistency so we dont have to constantly re-invent the wheel. Currently SnapCreator supports the following applications: Oracle, DB2, MaxDB, MySql, Lotus Notes, and Sybase. APP_NAME (oracle|db2|maxdb|mysql|notes|sybase) Setting which determines which Application is being backed up. SnapCreator has built in support for the listed applications. You can either use APP_NAME or configure APP_BACKUP_START_CMD1, APP_BACKUP_STOP_CMD1, and PRE_EXIT_CMD1. If the application is not directly supported in SnapCreator or you wish to run SnapCreator remotely you can use the below CMDS in combination with application scripts located under /path/to/snapcreator_v<#>/mods/<application> or your own application scripts and commands. APP_BACKUP_START_CMD1=/usr/bin/ssh l <user> -n /path/to/maxdbbackup.pl <Config> <Config Name> start APP_BACKUP_STOP_CMD1=/usr/bin/ssh l <user> -n /path/to/maxdbbackup.pl <Config> <Config Name> stop PRE_EXIT_CMD1=/usr/bin/ssh l <user> -n /path/to/maxdbbackup.pl <Config> <Config Name> stop 8.8.1 MAXDB Module MAXDB is the preferred database used by SAP since SAP also owns MAXDB. This module supports both Windows and Unix systems for MAXDB 7.x. The MAXDB module uses the dbmcli command to communicate with the database. 8.8.1.1 MAXDB Options APP_NAME=maxdb
XUSER_ENABLE (Y|N) Setting which enables the use of an xuser for maxdb. Using xuser does not require the password of the database user.

14

SnapCreator Installation and Administration Guide v3.1

DBMCLICMD Path to where the maxdb dbmclicmd is MAXDB_UPDATE_HIST_LOG (Y|N) Setting which determines if we update the maxdb history log DATABASES A comma separated list of the maxdb databases you wish to backup OS_WINDOWS (Y|N) Setting which tells SnapCreator if we are dealing with Windows since it is a little different 8.8.2 ORACLE Module Oracle is an enterprise database. The Oracle Module supports both Windows and Unix systems. The Oracle Module only supports Oracle 10g or higher. The entire database is put into backup mode and that is only supported starting with Oracle 10g. The Oracle module uses sqlplus to communicate with the database. . 8.8.2.1 Oracle Options APP_NAME=oracle DATABASES - A list of Database(s) and the username ie: db1:user1;db2:user2 SQLPLUS_CMD Path to the sqlplus command CNTL_FILE_BACKUP_DIR Path to the directory where we should store backup cntl files (oracle user must have permissions) ORA_TEMP Path to a directory for storing temp files ie: /tmp (oracle user must have permissions) OS_WINDOWS (Y|N) Setting which tells SnapCreator if we are dealing with Windows since it is a little different 8.8.3 MYSQL Module MYSQL is a popular database alternative to Oracle and SQL Server. The MYSQL module supports both Windows and Unix systems running MySQL 5.x. The MYSQL module uses Net-MySql to communicate with the database. 8.8.3.1 MYSQL Options APP_NAME=mysql DATABASES A list of Database(s) and the username/password ie: db1:user1/pwd1;db2:user2/pwd2 HOST- Name of the Host where the Database(s) are located ie: localhost PORTS A List of Database(s) and the ports they are listening on, ie: db1:3307;db2:3308
MASTER_SLAVE (Y|N) If the Database(s) is part of MASTER7SLAVE Environment

8.8.4 DB2 Module (Unix) DB2 is a high-end database alternative to Oracle and SQL Server. The DB2 module at this time will only run on Unix systems. The DB2 module uses the db2 command to communicate with the database. 8.8.4.1 DB2 Options (Unix) APP_NAME=db2 DATABASES A list of Database(s) and the username ie: db1:user1;db2:user2 DB2_CMD The path to the db2 command which is what we use to interact with the database 8.8.5 DB2 Integration (Windows) DB2 running on windows is implemented with SnapCreator using bat files which except input (username, password, database). The three bat files are located under /path/to/snapcreator_v<#>/mods/db2: db2_write_suspend.bat Suspends writes to a database db2_write_resume.bat Resumes writes to a database db2_reset.bat Resets the db2 connection

15

SnapCreator Installation and Administration Guide v3.1

Each bat file needs to be passed the database, username, and password. Below is an example of just how the bat files should be implemented within the SnapCreator configuration file: Before we take the snapshot we want to suspend writes to the database APP_BACKUP_START_CMD1="C:\Program Files\IBM\SQLLIB\BIN\db2cmd" /w /c /i "c:\snapcreator_v2.5\db2_write_suspend.bat <database> <user> <password>" APP_BACKUP_START_CMD2="C:\Program Files\IBM\SQLLIB\BIN\db2cmd" /w /c /i "c:\snapcreator_v2.5\db2_reset.bat <database> <user> <password>" After the snapshot is taking we want to resume writes to the database APP_BACKUP_STOP_CMD1="C:\Program Files\IBM\SQLLIB\BIN\db2cmd" /w /c /i "c:\snapcreator_v2.5\db2_write_resume.bat <database> <user> <password>" APP_BACKUP_STOP_CMD2="C:\Program Files\IBM\SQLLIB\BIN\db2cmd" /w /c /i "c:\snapcreator_v2.5\db2_reset.bat <database> <user> <password>" In case of an error we want to ensure we resume writes to the database PRE_EXIT_CMD1="C:\Program Files\IBM\SQLLIB\BIN\db2cmd" /w /c /i "c:\snapcreator_v2.5\db2_write_resume.bat <database> <user> <password>" PRE_EXIT_CMD2="C:\Program Files\IBM\SQLLIB\BIN\db2cmd" /w /c /i "c:\snapcreator_v2.5\db2_reset.bat <database> <user> <password>" 8.8.6 Sybase Module (Unix) Sybase ASE is a high-end database alternative to Oracle and SQL Server. The Sybase module at this time will only run on Unix systems. The Sybase module uses the isql command to communicate with the database. 8.8.6.1 Sybase Options APP_NAME=sybase SERVER Hostname of the server running Sybase DATABASES A list of Database(s) and their username/password ie: db1:user1/pwd1;db2:user2/pwd2 ISQL_CMD Path to the isql command ie: /path/to/isql SYBASE - Path to the Sybase Home Directory ie: /path/to/sybase_home LOGDIR Path to location where logs should be written ie: /path/to/logdir 8.8.7 Lotus Domino Module Lotus Domino is a collaboration solution that provides reliable and security-rich e-mail and calendaring capabilities as well as a powerful platform for collaborative business application. The Lotus Domino module will run on both windows and unix systems. The module uses CLI commands as opposed to API calls, meaning that the transaction logs are not integrated and this is a point in time backup only. For consistency purposes it is suggested that you make regular offline backups while the Domino server is stopped, perhaps during your nightly or weekly maintenance window. Online backups work very well, but consistency is not guaranteed. This module only handles online backups only at this time. Note: SnapCreator must be run as the domino admin user 8.8.7.1 Lotus Notes Options APP_NAME=notes DOM_ADMIN The Domino Administration User (Unix Only) SERVER_CMD Path to the Domino server (unix) or nserver (windows) command LOTUS Path to the Lotus Domino bin directory where the server or nserver exist DOMINO_DATA_PATH Path to the domino data directory (Unix Only) DOMINO_SERVICE_NAME The Domino Service Name (Windows Only)

16

SnapCreator Installation and Administration Guide v3.1

RC_DOMINO_CMD Path to the domino rc script rc_domino_script (Unix Only) OS_WINDOWS (Y|N) Depending on if lotus is running on a windows host 8.8.8 Archive Log Module
The Archive Log Module should work for any database, it is database independent. The Archive Log Module will delete archive logs older than X Days. This module is for managing archive log deletion and the module does not communicate with the database, it simply deletes archive logs.

8.8.8.1 Archive Log Options ARCHIVE_LOG_ENABLE (Y|N) Setting which Enables Archive Log Management (deletion of old archive logs) ARCHIVE_LOG_RETENTION Retention in Days of how old the archive logs should be, epoch time is used to is it precise to the second ARCHIVE_LOG_DIR Path to the directory that contains the archive logs ARCHIVE_LOG_EXT File Extension of the archive logs ie: if the archive logs are 10192091019.log you would set this to log. The search pattern we use is <something>.<extension>

Running SnapCreator

It is recommended to schedule SnapCreator from unix cron or windows task manager. Below is an explanation of the Arguments: Note: When scheduling through windows task manager create a .bat file since task manager doesnt like programs that require input. ./snapcreator --config <Config> --action <Action> --policy <Policy> <Optional Arguments> --config <Config> - Name of the configuration should be the name you gave to the directory/file without the .conf at the end. This is your profile, you can create other config files under the same profile directory but then you need to use the --other option explained below to use that alternate config instead of the default config associated with the profile. list Displays all configs known to SnapCreator, dont try and use list as a profile name since it will only display configs. IE: ./snapcreator --config list setup Runs the SnapCreator setup which configures both the GUI and SnapCreator itself IE: ./snapcreator --config setup --action <Action> (snap|clone_vol|clone_lun|arch|restore|delete|snaplist|clonelist|pmsetup) There are currently ten possible actions, take a snapshot (snap), perform an ossv backup (ossv), take a snapshot as well as volume clone (clone_vol), take a snapshot as well as a lun clone (clone_lun), handle only archiving for an application (arch), do an interactive restore (restore), do an interactive delete (delete), list snapshots for a given policy (snaplist), list volume clones (clonelist), configure a protection manager dataset (pmsetup). snap Takes a snapshot and whatever else you have configured IE: ./snapcreator --config <Config> --action snap --policy <Policy> <Optional Arguments> ossv - Uses OSSV to perform the backup, no snapshot is taken IE: ./snapcreator --config <Config> --action ossv --policy <Policy> <Optional Arguments> clone_vol Takes a snapshot plus whatever else is configured and then uses that snapshot to make a volume clone. This does require a FlexClone license. Once the volume is cloned an Igroup is mapped to

17

SnapCreator Installation and Administration Guide v3.1

all the luns which reside in the cloned volume using the NTAP_CLONE_IGROUP_MAP option in the configuration file. Note: Volume Clone names are as follows: cl_<source volume>_YYYYMMDDhhmmss IE: ./snapcreator --config <Config> clone_vol --policy <Policy> <Optional Arguments> clone_lun Takes a snapshot plus whatever else is configured and then uses that snapshot to make a lun clone of all luns that reside in the source volume. Once the luns are cloned an IGROUP is mapped to all the cloned luns which reside in the source volume using the NTAP_CLONE_IGROUP_MAP option in the configuration file. Note: due to potential for snapshots to be locked by cloned luns, this is not the recommended method but it comes down to if customer owns a FlexClone license. If they do use clone_vol which uses FlexClone. Lun Clone names are always as follows: <source lun>_CLONE IE: ./snapcreator --config <Config> --action clone_lun --policy <Policy> <Optional Arguments> arch This function will only provide archiving functionality for an application. No NetApp commands or functions will be preformed. The idea was to allow one to do archiving outside a backup. At this time you need to provide the archiving script or command so this is just a wrapper to provide your scripts or commands with the SnapCreator error handling. IE: ./snapcreator --config <Config> --action arch <Optional Arguments> restore This function will guide you through an interactive restore. You can do a volume or file restore. File restore is for luns. A volume restore is only recommended in case of a disaster otherwise you should always recover files. For NAS you can do this by simply copying files out of the ~snapshot dir so there is no need to handle NAS file restore with SnapCreator. IE: ./snapcreator --config <Config> --action restore -policy <Policy> <Optional Arguments> delete This function will guide you through an interactive snapshot delete menu for a given SnapCreator policy IE: ./snapcreator --config <Config> --action delete -policy <Policy> <Optional Arguments> snaplist This function will list all snapshots that are being managed by SnapCreator. It will show snapshots on primary as well as secondary storage. IE: ./snapcreator --config <Config> --action snaplist <Optional Arguments> clonelist This function will list all volume clones that are being managed by SnapCreator. It will show volume clones on primary as well as secondary storage. IE: ./snapcreator --config <Config> --action clonelist <Optional Arguments> pmsetup - Creates a Protection Manager Dataset for given config IE: ./snapcreator --config <Config> --action pmsetup <Optional Arguments> Note: After create the Protection Manager dataset you will need to go into PM and configure it which involves adding relationships and defining the protection policy. --policy <Policy> The name of the Snapshot Policy you have defined in NTAP_SNAPSHOT_RETENTIONS and possibly NTAP_SNAPVAULT_RETENTIONS. You can name the snapshot policy whatever you want but it is important that the name you pass SnapCreator as --policy be

18

SnapCreator Installation and Administration Guide v3.1

the exactly same and defined in NTAP_SNAPSHOT_RETENTIONS as well as possibly NTAP_SNAPVAULT_RETENTIONS if you are using SnapVault. You can also have as many of these as you want all with different retentions. Note: If you are using SnapDrive to create the snapshots, please use lower case. SnapDrive (at least windows) doesnt understand difference between upper case and lower case. Optional Arguments --other Allows you to specify an alternate config file located under the /path/to/snapcreator_v<#>/<Config> directory IE: ./snapcreator config <Config> --action <Action> --policy <Policy> --other <Alternate Config> Note: This option is required when the profile /path/to/snapcreator_v<#>/configs/<profile> and config dont match /path/to/snapcreator_v<#>/configs/<profile>/<config>.conf --verbose The verbose option will display all logging information to STDOUT. This is an optional setting and is mostly for testing and running SnapCreator manually. IE: ./snapcreator config <Config> --action <Action> --policy <Policy> --other <Alternate Config> -verbose --debug The debug option will display all logging information to STDOUT and the log file. This is an optional setting and is for debugging problems. IE: ./snapcreator --config <Config> --action <Action> --policy <Policy> --other <Alternate Config> -verbose --debug --version - Prints SnapCreator Version IE: ./snapcreator --version --cryptpasswd - Encrypt a password for storing in a config file IE: ./snapcreator --cryptpasswd --user_defined The user_defined option gives one the ability to pass an argument from SnapCreator directly to its configuration file. For example if you wanted to integrate SnapCreator with NetBackup you could call SnapCreator Monday-Friday with the onsite NetBackup schedule and on Sunday with the offsite NetBackup schedule. You would reference this in the configuration file for SnapCreator with %USER_DEFINED and give SnapCreator onsite or offsite as the User Defined input. IE: ./snapcreator --config <Config> --action <Action> --policy <Policy> --other <Alternate Config> -verbose --user_defined weekly_nbu_schedule

10 SnapCreator Examples
SnapCreator offers the flexible to do something as simple as creating a snapshot to something as complex as cloning a SnapMirror destination volume. Below are examples of supported SnapCreator configurations: 10.1 NetApp Snapshot (always required)
In this solution we are using SnapCreator to create a consistent snapshot. Since a snapshot is the basis for everything we do, all examples require the below settings.

19

SnapCreator Installation and Administration Guide v3.1

Configuration Option SNAME VOLUMES NTAP_USERS TRANSPORT PORT LOG_NUM NTAP_PWD_PROTECTION NTAP_SNAPSHOT_RETENTIONS
Call SnapCreator with the following options:

Setting <snapshot name> filer1:vol1,vol2,vol3 filer1:snapadm/mypassword HTTP 80 10 N daily:7

./snapcreator --config <Config Name> --action snap --policy daily <Optional Arguments> Note: These settings are always need regardless of what you are doing. In this case we have only created one retention policy daily which will keep seven snapshots. 10.2 NetApp Application Consistent Backup
In this solution we are combining an Application quiesce and unquiesce with a NetApp snapshot.

Configuration Option APP_NAME


Call SnapCreator with the following options:

Setting oracle|db2|maxdb|mysql|notes|sybase

./snapcreator --config <Config Name> --action snap --policy <Policy Name> <Optional Arguments> 10.3 NetApp Snapshot and Backup to Tape In this solution we are using SnapCreator to create a snapshot, clone the snapshot, mount the clone, and rd then backup the mountpoint to tape using 3 party backup software Configuration Option NTAP_CLONE_FOR_BACKUP NTAP_CLONE_SECONDARY NTAP_CLONE_IGROUP_MAP NTAP_VOL_CLONE_RESERVE NTAP_NUM_VOL_CLONES NTAP_LUN_CLONE_RESERVATION PRE_NTAP_CLONE_DELETE_CMD1 PRE_NTAP_CLONE_DELETE_CMD2 Setting Y N filer1:src_volume1/igroup1 none 1 false <Mount Script or SnapDrive command> <CLI command to start backup of mountpoint>

For Volume clone call SnapCreator with the following options: ./snapcreator --config <Config Name> --action clone_vol --policy <Policy Name> <Optional Arguments> For Lun clone call SnapCreator with the following options: ./snapcreator --config <Config Name> --action clone_lun --policy <Policy Name> <Optional Arguments> 10.4 NetApp Backup to Disk (OSSV) In this solution we are using the OSSV client perform a SnapVault update / snapshot on secondary storage. Configuration Option NTAP_OSSV_ENABLE NTAP_OSSV_HOMEDIR
Call SnapCreator with the following options:

Setting Y /usr/snapvault

20

SnapCreator Installation and Administration Guide v3.1

./snapcreator --config <Config Name> --action ossv --policy <Policy Name> <Optional Arguments> 10.5 NetApp Snapshot and Backup to Disk (SnapVault)
In this solution we are using SnapCreator to create a snapshot, perform a SnapVault update, and take a snapshot of the SnapVault secondary

Configuration Option SNAPVAULT_VOLUMES NTAP_SNAPVAULT_RETENTIONS NTAP_SNAPVAULT_RETENTION_AGE NTAP_SNAPVAULT_MAX_TRANSFER NTAP_SNAPVAULT_UPDATE NTAP_SNAPVAULT_WAIT NTAP_SNAPVAULT_NODELETE


Call SnapCreator with the following options:

Setting filer1:vol1,vol2,vol3 Daily:30 30 <kbps> or blank Y <minutes> N

./snapcreator --config <Config Name> --action snap --policy <Policy Name> <Optional Arguments> 10.6 NetApp Snapshot and Backup to Disk (SnapMirror)
In this solution we are using SnapCreator to create a snapshot and perform a SnapMirror update

Configuration Option SNAPMIROR_VOLUMES NTAP_SNAPMIRROR_USE_SNAPSHOT NTAP_SNAPMIRROR_MAX_TRANSFER NTAP_SNAPMIRROR_UPDATE


Call SnapCreator with the following options:

Setting filer1:vol1,vol2,vol3 Y <kbps> or blank Y

./snapcreator --config <Config Name> --action snap --policy <Policy Name> <Optional Arguments> 10.7 NetApp Snapshot and Database Refresh (Primary)
In this solution we are using SnapCreator to create a snapshot and then clone that snapshot

Configuration Option NTAP_CLONE_FOR_BACKUP NTAP_CLONE_IGROUP_MAP NTAP_VOL_CLONE_RESERVE NTAP_LUN_CLONE_RESERVATION POST_NTAP_CMD1 POST_NTAP_CMD2

Setting Y filer1:src_volume1/igroup1 none false <Mount Script or SnapDrive command to mount clone> <CLI command or script to start cloned database>

For Volume clone call SnapCreator with the following options: ./snapcreator --config <Config Name> --action clone_vol --policy <Policy Name> <Optional Arguments> For Lun clone call SnapCreator with the following options: ./snapcreator --config <Config Name> --action clone_lun --policy <Policy Name> <Optional Arguments> 10.8 NetApp Snapshot and Database Refresh (Secondary)
In this solution we are using SnapCreator to create a snapshot, perform a SnapMirror update, and clone the SnapMirror destination volume

21

SnapCreator Installation and Administration Guide v3.1

Configuration Option Setting SNAPMIROR_VOLUMES filer1:vol1,vol2,vol3 NTAP_SNAPMIRROR_USE_SNAPSHOT Y NTAP_SNAPMIRROR_MAX_TRANSFER <kbps> or blank NTAP_SNAPMIRROR_UPDATE Y NTAP_CLONE_SECONDARY_VOLUMES filer1:filer1-sec/vol1,vol2,vol3 NTAP_CLONE_SECONDARY Y NTAP_CLONE_FOR_BACKUP Y NTAP_VOL_CLONE_RESERVE none NTAP_NUM_VOL_CLONES 1 POST_NTAP_CMD1 <Mount Script or SnapDrive command to mount clone> POST_NTAP_CMD2 <CLI command or script to start cloned database> For Volume clone call SnapCreator with the following options: ./snapcreator --config <Config Name> --action clone_vol --policy <Policy Name> <Optional Arguments> 10.9 NetApp Snapshot and Protection Manager Update
In this we are using SnapCreator to create a snapshot, register that snapshot with Protection Manager, and the use Protection Manager to manage SnapVault or SnapMirror

Configuration Option NTAP_PM_UPDATE NTAP_DFM_DATA_SET NTAP_SNAPSHOT_NODELETE

Setting Y filer1:dataset1/vol1,vol2;filer1:dataset2/vol3 Y

Call SnapCreator with the following options: ./snapcreator --config <Config Name> --action snap --policy <Policy Name> <Optional Arguments> Note: Both Operations Manager and Protection Manager are required. In addition you need to configure a dataset created by SnapCreator within Protection Manager and create a schedule for that dataset (secondary). SnapCreator or PM can delete primary snapshots, Protection Manager will manage all secondary snapshots and their retentions.

11 Troubleshooting
There are several logs SnapCreator writes to and that is the first place to begin troubleshooting. There are three logs for every configuration and they are as follows: out, error, and debug. The out and debug logs are kept as long as you want which is defined by the LUG_NUM value in the configuration file while the error log is always appended to. All logs are written to the /path/to/snapcreator_v<#>/logs/<profile> directory. OUT LOG The out or output log is first place to look and contains information about everything SnapCreator does. Messages can be INFO, CMD, OUTPUT, WARN, or ERROR. Anything with INFO is considered to be standard normally occurring operations. Anything with CMD is an external command or script that SnapCreator ran (according to configuration) and we do log the return code from the command or script. Typically these are PRE, POST, or APP Start/Stop commands. Anything with OUTPUT is a ZAPI call. Anything with WARN is considered to draw your attention but again under normal circumstances it is considered to be normal activity as well and should require no action (an example is when we delete snapshots). Anything with ERROR is a problem and will most likely require manual action to fix. SnapCreator will exit on any ERROR so it is important to fix whatever problem occurred before it runs again. SnapCreator will not automatically fix problems although you can be proactive be telling SnapCreator what to do before it exists via the PRE_EXIT_CMD defined in the configuration file. DEBUG LOG The debug log contains the return from any external commands or scripts run by SnapCreator. It is very important if you call other scripts through SnapCreator

22

SnapCreator Installation and Administration Guide v3.1

that you have properly setup exit codes and output for those scripts, you should never exit with status 0 if a problem indeed occurred. ERROR LOG The error log contains a history of all the ERROR events for a given configuration. This is a good place to see what kinds of errors happened in the past so you can correlate things better and get a historical perspective. You can also do monitoring on this log file and use it as a means to integrate SnapCreator with your monitoring application. 11.1 Networking There are three areas to check when you are getting authorization failures from SnapCreator: IP/Hostname configuration, firewall permissions, and NAT. IP/Hostname unless you are using host equiv the filer name returned from the hostname command on the filer needs to be same name as what you entered in the SnapCreator config file. You cant use an FQDN when the hostname of a filer is the short name for example. Make sure that the IP resolution matches the name you specified. If there is a mismatch you can get things working by using host equiv on the filer. To enable host equiv do the following on the filer: options httpd.admin.hostsequiv.enable on Edit the /etc/hostsequiv file and add the following: <IP/Name of host in SnapCreator config> <SnapCreator user> Firewall If you have a firewall between the host running SnapCreator and your NetApp filer make sure you have ACLs (bi-directional) open for 80, 443, or both. Make sure the return traffic from the filer is allowed to go to the system running SnapCreator on at least non-privileged ports NAT If you are using NAT make sure the source/destination IP addresses are not being changed in the TCP Packet. The host and filer need to know who they are taking too and presenting a firewall IP instead of the actual host or filer IP will cause things to break. HTTPS If you want to use HTTPS (443) for Linux or AIX you need to install the following rpm: openssldevel. This rpm contains the openssl libraries which are required to use SSL. Other Operating Systems (Windows and Solaris) have not been tested. Source Code The SnapCreator source code (snapcreator.pl) is not distributed with the standard distribution. In order to get the source code you need to send an email to dl-snapcreator (internal) or contact your NetApp Sales Representative (external). The source code requires you install the following: Perl 5.6 or higher (ActiveState Perl recommended) Openssl Development Libraries (openssl-devel, required for HTTPS only) LWP::UserAgent (required) XML::Parser (required) Net:SSLeay (required for HTTPS only) Crypt::CBC (required for NTAP_PWD_PROTECTION and GUI only) Crypt::DES (required for NTAP_PWD_PROTECTION and GUI only) Term::ReadKey (required for NTAP_PWD_PROTECTION and GUI only) Sys::Hostname (required) FindBin (required) 11.2 Upgrading from SnapCreator v2.6 In order to get SnapCreator 3.0 to use a configuration file from version 2.6 you need to add the following:

23

SnapCreator Installation and Administration Guide v3.1

TRANSPORT=HTTP PORT=80 NTAP_NUM_VOL_CLONES=1 NTAP_CONSISTENCY_GROUP_TIMEOUT=medium 11.3 Upgrading from SnapCreator v3.0 In order to get SnapCreator 3.1 to use a configuration file from version 3.0 you need to add the following:
NTAP_SNAPSHOT_DISABLE=N NTAP_OSSV_ENABLE=N NTAP_OSSV_HOMEDIR=/usr/snapvault POST_NTAP_DATA_TRANSFER_CMD1= NTAP_ASUP_ERROR_ENABLE=N APP_NAME=oracle|db2|maxdb|mysql|notes|sybase ### Oracle on Windows and Unix replace everything ### DATABASES:db1:user1;db2:user2 SQLPLUS_CMD="/path/to/sqlplus" CNTL_FILE_BACKUP_DIR=/path/to/cntl_files ORA_TEMP=/path/to/oratemp OS_WINDOWS=N ### Lotus Domino on Windows Add ### DOMINO_SERVICE_NAME= "Lotus Domino Server (FDominodata)"

12 Software / Right of Use


12.1 Third-Party Software Shall third-party licenses and / or materials be required for delivery of the SnapCreator script, the supply of the same is not owed by NetApp. 12.2 Output NetApp grants the contractual partner a basic, non-exclusive and non-transferable right of use of SnapCreator script. A separate use of SnapCreator is excluded. 12.3 Scripts / Programming Shall the creation / adaptation of a SnapCreator script (Perl, Batch, CMD) and / or programming (Java, C++) be part of the scope of service, the recipient of service is granted a basic, non-exclusive and nontransferable right of use herein. However, the recipient of service is permitted to perform the changes to the script necessary in the course of service procedures and maintenance. After completion of the SnapCreator script / programming and successful acceptance of the SnapCreator script and / or program by the recipient of service, it is handed over to the same. The parties agree that the recipient of service assumes full responsibility of the sole service and maintenance of the SnapCreator script and / or program as per the time of handover. After the handover, NetApp no longer assumes any obligations towards the recipient of service. This also precludes potential warranty obligations and support services. 12.4 Miscellaneous Under no circumstances does the scope of service comprise a transfer of a right of use of NetApp software.

24

SnapCreator Installation and Administration Guide v3.1

All property rights which existed prior to the delivery of service will remain with the respective owner of the property rights. Irrespective of paragraph Output sole NetApp retains the right to unconditionally use, change, propagate and exploit all the general expertise, concepts, processes, methods, know-how, procedures, etc. and interim results underlying the output. Shall patentable output or output apt for a registered design arise through NetApp in the course of the delivery of service NetApp is entitled the sole right to file respective applications under its own name. Shall that be the case and shall it be demanded by the contractual partner, the contractual partner is granted a basic, non-transferable and unrestricted license for use free of charge.

13 Further Questions/Help?
For further questions or support please contact dl-snapcreator@netapp.com. Also send any information on feature requests or bugs to the above dl list. Most importantly please send your feedback, we would love to hear what you think (good or bad) and what ideas you may have, if you made it this far you probably have enough time to send us an email

25

SnapCreator Installation and Administration Guide v3.1

14 Appendix A: SnapCreator Architecture Diagram

26

You might also like