Data Backup and Recovery

Snapcreator with SMSQL Config?!?!

robert_updegraff
3,546 Views

I've been working my way through the documentation and posts on this forum while trying to do a simple configuration in Snap Creator for SnapManager for SQL. This should be a very simple thing but I can't figure out how to configure it and there are no examples. I simply want to have Snap Creator schedule my SnapManager for SQL backups. Do I need a Standard Configuration or a Plug-in Configuration, or do I need a Standard that calls a Plug-in? I've even saw a post that seemed to ignore the built-in SMSQL plugin and said to just use the PRE command.

What I'm really looking for is a step by step on how I set this up. I'm not looking for an idiots guide, but I would like details on where I need to tweak the config (if any) after the GUI is complete. I'm quite experienced with NetApp and SnapManager, but the Snap Creator documentation seems to be quite lacking in this scenario and I'm at a loss.

Thanks for any help you can provide!

5 REPLIES 5

spinks
3,546 Views

Robert,

I don't have access to an SMSQL environment off hand, but I'll do what I can to help.

Other people here may have more experience with the SMSQL  plug-in than I do.

There are a bunch of videos on Snap Creator available here:  http://www.youtube.com/SnapCreatorTV

There is not one specific to SnapManager for SQL, but the Introduction to the GUI video walks through creating a configuration file.

http://www.youtube.com/watch?v=NTNULVnvz4o

The SnapManager for SQL plug-in is one of the plug-ins listed under application plug-ins.

Just go through the wizard as shown in the above video and select the SnapManager for SQL instead of the one in the video and fill out the needed parameters.

If you're doing this through the CLI, here is some of the info in the docs that I have:

Note:  The GUI does most of these steps for you as you go through the wizard.

Configure Snap Creator for SMSQL

Complete the following steps to configure Snap Creator for SMSQL:

  1. Confirm that SMSQL is installed on the system.
  2. Run the SMSQL Configuration Wizard to verify that all components are stored on NetApp storage.
  3. Confirm that Snap Creator is installed. In instances where Snap Creator Server exists on a remote server, install Snap Creator Agent on SMSQL server and uncheck “Start agent as service”. For SMSQL plug-in the agent needs to be started from command line or via batch file.
  4. Configure the new Snap Creator configuration File:
  5. Define APP_NAME=smsql.
  6. Define VOLUMES=<filer>:<smsql-volumes>.
  7. Define NTAP_USERS=<filer>:<user>\<pwd>.
  8. Define TRANSPORT=http.
  9. Define PORT=80.
  10. Define SMSQL_PS_CONF= "C:\Program Files\NetApp\SnapManager for SQL Server\smsqlShell.psc1".
  11. Define SC_AGENT_TIMEOUT=600.
  12. Define SMSQL_BACKUP_OPTIONS= -svr '%%SERVERNAME%%' -d '%%SERVERNAME%%','1','%%SQLINSTANCE%%' -RetainBackups 8 -lb -bksif -RetainSnapofSnapInfo 8 -trlog -ver -gen -mgmt daily
    # change all %% parameters with the needed parameters.
  13. Define SMSQL_SERVER_NAME=<servername> # in lowercase.
  14. Define SMSQL_32bit=Y.
  15. Run Snap Creator and verify that the SMSQL PowerShell new-backup completes successfully.

Table 2 shows an overview of the SMSQL plug-in parameters.

Table 2) SMSQL plug-in parameters.

APP_NAME

smsql

The database application name

VOLUMES

Database volumes

Volumes on which the database resides

Format:

Storage name:vol1,vol2,vol3

NTAP_USERS

Storage name, user name, and password

Storage controller name with login credentials

Format:

Storage name:username/password

TRANSPORT

HTTP

Protocol for API communication

PORT

80

Communication port for HTTP

SMSQL_PS_CONF

N/A

Path to the PowerShell configuration file for SMSQL

SMSQL_BACKUP_OPTIONS

N/A

SMSQL backup options. (Snap Creator uses a PowerShell new-backup cmdlet.)

SMSQL_SERVER_NAME

N/A

SMSQL server name (enter in lowercase)

SMSQL_32bit

Y or N

Setting to enable use of 32-bit version of PowerShell

Hope this helps!

John

robert_updegraff
3,546 Views

Ok, I walked through the GUI config (again) and in the end I have a config not much different from my first attempt. The job runs, but does absolutely nothing?!?!? I've pasted the config below, but replaced the server and controller names as well as the passwords with placeholders. I also removed the plugin sections such as oracle, DB2, etc to reduce the size of this post. I've removed nothing from the live file.

Should any of the options below be changed to a Y?

APP_DEFINED_BACKUP=N

APP_DEFINED_RESTORE=N

APP_DEFINED_CLONE=N

APP_DEFINED_MOUNT=N

APP_DEFINED_UMOUNT=N

Can you tell me what I am doing wrong?

########################

### Required Options ###

########################

CONFIG_TYPE=STANDARD

SNAME=smvi__sqlsnap__servername

SNAP_TIMESTAMP_ONLY=N

VOLUMES=%%NA_CONTROLLER%%:%%VOLUME)!%%,%%VOLUME02%%,%%VOLUME03%%

NTAP_SNAPSHOT_RETENTIONS=daily:14

NTAP_USERS=%%NA_CONTROLLER%%:root/%%PASSWORD%%

NTAP_PWD_PROTECTION=Y

TRANSPORT=HTTP

PORT=80

NTAP_TIMEOUT=60

LOG_NUM=30

LOG_TRACE_ENABLE=Y

SC_TMP_DIR=

##########################

### Connection Options ###

##########################

MANAGEMENT_INTERFACES=

SECONDARY_INTERFACES=

USE_PROXY=N

ALLOW_IP_ADDR=N

######################

### CMODE Settings ###

######################

CMODE_CLUSTER_USERS=

CMODE_CLUSTER_NAME=

CMODE_SNAPSHOT_FORCE_DELETE=Y

########################

### Snapshot Options ###

########################

NTAP_SNAPSHOT_RETENTION_AGE=14

SNAPDRIVE=N

SNAPDRIVE_DISCOVERY=N

NTAP_SNAPSHOT_DISABLE=Y

NTAP_SNAPSHOT_NODELETE=N

NTAP_CONSISTENCY_GROUP_SNAPSHOT=N

NTAP_CONSISTENCY_GROUP_TIMEOUT=medium

NTAP_CONSISTENCY_GROUP_WAFL_SYNC=N

NTAP_SNAPSHOT_DELETE_BY_AGE_ONLY=N

NTAP_SNAPSHOT_DEPENDENCY_IGNORE=N

NTAP_SNAPSHOT_RESTORE_AUTO_DETECT=N

NTAP_SNAPSHOT_CLEANUP=N

NTAP_USE_EXTERNAL_SNAPSHOT=N

NTAP_EXTERNAL_SNAPSHOT_REGEX=

#########################

### SnapVault Options ###

#########################

NTAP_SNAPVAULT_UPDATE=N

SNAPVAULT_VOLUMES=

SNAPVAULT_QTREE_INCLUDE=

NTAP_SNAPVAULT_RETENTIONS=

NTAP_SNAPVAULT_RETENTION_AGE=

NTAP_SNAPVAULT_SNAPSHOT=N

NTAP_SNAPVAULT_NODELETE=N

NTAP_SNAPVAULT_RESTORE_WAIT=N

NTAP_SNAPVAULT_WAIT=60

NTAP_SNAPVAULT_MAX_TRANSFER=

##########################

### SnapMirror Options ###

##########################

NTAP_SNAPMIRROR_UPDATE=N

NTAP_SNAPMIRROR_CASCADING_UPDATE=N

SNAPMIRROR_VOLUMES=

SNAPMIRROR_CASCADING_VOLUMES=

NTAP_SNAPMIRROR_WAIT=60

NTAP_SNAPMIRROR_USE_SNAPSHOT=Y

NTAP_SNAPMIRROR_MAX_TRANSFER=

#######################

### Cloning Options ###

#######################

NTAP_VOL_CLONE_RESERVE=none

NTAP_LUN_CLONE_RESERVATION=false

NTAP_CLONE_IGROUP_MAP=

NTAP_CLONE_FOR_BACKUP=Y

NTAP_CLONE_SECONDARY=N

NTAP_CLONE_SECONDARY_VOLUMES=

NTAP_NUM_VOL_CLONES=1

NTAP_NFS_EXPORT_HOST=

NTAP_NFS_EXPORT_ACCESS=

NTAP_NFS_EXPORT_PERSISTENT=false

NTAP_CIFS_EXPORT_ENABLE=N

##################################

### Protection Manager Options ###

##################################

NTAP_PM_UPDATE=N

NTAP_DFM_DATA_SET=

NTAP_PM_RUN_BACKUP=N

NTAP_DFM_SNAPSHOT_FORMAT=

####################

### OSSV Options ###

####################

NTAP_OSSV_ENABLE=N

NTAP_OSSV_HOMEDIR=

NTAP_OSSV_FS_SNAPSHOT=N

NTAP_OSSV_FS_SNAPSHOT_CREATE_CMD01=

###################################

### Operations Manager Settings ###

###################################

OM_HOST=%%OMSERVER%%

OM_USER=Administrator

OM_PWD=%%PASSWORD%%

OM_PORT=8080

OM_EVENT_GENERATE=Y

####################

### APP Commands ###

####################

ARCHIVE_CMD01=

MOUNT_CMD01=

UMOUNT_CMD01=

####################

### Pre Commands ###

####################

PRE_APP_QUIESCE_CMD01=

PRE_NTAP_CMD01=

PRE_NTAP_CLONE_DELETE_CMD01=

PRE_APP_UNQUIESCE_CMD01=

PRE_RESTORE_CMD01=

PRE_CLONE_CREATE_CMD01=

#####################

### Post Commands ###

#####################

POST_APP_QUIESCE_CMD01=

POST_NTAP_CMD01=

POST_NTAP_DATA_TRANSFER_CMD01=

POST_APP_UNQUIESCE_CMD01=

POST_RESTORE_CMD01=

POST_CLONE_CREATE_CMD01=

###########################

### Event Configuration ###

###########################

NTAP_ASUP_ERROR_ENABLE=N

SENDTRAP=

SUCCESS_TRAP=

SUCCESS_MSG=INFO: Snap Creator finished successfully ( Action: %ACTION )

###################################

### Client/Server Configuration ###

###################################

##################################################################################################################

# SC_AGENT - <hostname or ip>:<port>                                                                             #

#   Snap Creator has the capability to perform tasks on remote hosts. A task is either a defined module          #

#   (parameter APP_NAME) or a command specified with the parameters *_CMD*, e. g. NTAP_SNAPSHOT_CREATE_CMD01     #

#                                                                                                                #

#   To specify a remote host, enter it's name or ip address followed by a colon and the port, the Snap Creator   #

#   Agent listening on.                                                                                          #

#   On the remote host, start the Snap Creator Agent                                                             #

#      <path to Snap Creator>/snapcreator --start-agent <port>                                                   #

#                                                                                                                #

#   If running in local mode, the parameter must be left blank.                                                  #

#                                                                                                                #

# SC_CLONE_TARGET - <hostname or ip of the clone target>:<port>                                                  #

#   Snap Creator has the capability to perform clone operations. Using the action 'clone_vol' in combination     #

#   with {PRE|POST}_CLONE_CREATE_CMDxx to handle the storage objects on the remote side                          #

#   (e. g. mounting/unmounting filesytems), either the module is enabled to perform all the necessary            #

#   activities to                                                                                                #

#                                                                                                                #

#   To specify a clone target, enter it's name or ip address followed by a colon and the port, the Snap Creator  #

#   Agent listening on.                                                                                          #

#                                                                                                                #

# SC_AGENT_TIMEOUT - Number, timeout in seconds                                                                  #

#   The implemented client/server architecture uses a timeout mechanism. This means, if the client does not      #

#   respond in the specified interval, the server fails with a timeout message. However, the task on the client  #

#   is left untouched (will not be aborted) and needs further investigation.                                     #

#                                                                                                                #

#   On server with high load or known, long running tasks like own scripts or complex SnapDrive operations       #

#   it might be necessary to extend the timeout and adapt this value on your own needs.                          #

#                                                                                                                #

#   Per default, a timeout of 300 seconds is used.                                                               #

#                                                                                                                #

# SC_AGENT_WATCHDOG_ENABLE - (Y|N)                                                                               #

#   Snap Creator starts a watchdog process while quiescing the database. After the period specified with         #

#   SC_AGENT_UNQUIESCE_TIMEOUT, the database will be brought into normal operation automatically.                #

#                                                                                                                #

# SC_AGENT_UNQUIESCE_TIMEOUT - Number, timeout in seconds                                                        #

#   Time to wait after a database quiesce operation to bring back the database into normal operation mode again. #

#   This is only available in combination with SC_AGENT_WATCHDOG_ENABLE=Y                                        #

#                                                                                                                #

#   Per default, SC_AGENT_TIMEOUT + 5 is used.                                                                   #

#                                                                                                                                             #

# SC_AGENT_LOG_ENABLE - (Y|N) Setting which enables logging on agent. The Snap Creator server sends operations           #

#                              to the agent. If something happens before agent sends callback to server it is possible           #

#                              messages could be lost. This allows agent messages to be logged on agent so they are           #

#                              never lost.                                                                                                     #

##################################################################################################################

SC_AGENT=%%SERVER%%:9090

SC_AGENT_TIMEOUT=950

SC_AGENT_UNQUIESCE_TIMEOUT=

SC_CLONE_TARGET=

SC_AGENT_WATCHDOG_ENABLE=Y

SC_AGENT_LOG_ENABLE=Y

#############################

### Plugin Module Options ###

#############################

##################################################################################################################################

# APP_NAME - (oracle|db2|mysql|domino|vibe|smsql|sme|sybase|maxdb|kvm|xen|<plugin>) Setting which determines which plug-in            #

#          is being used. Snap Creator has built-in support for the listed applications. A community plug-in can be used                      #

#          or you can configure APP_QUIESCE_CMD01, APP_UNQUIESCE_CMD01, and PRE_EXIT_CMD01                                                               #

#                                                                                                                                                                 #

# FS_NAME - (<plugin>) Setting which determines which plug-in is being used for file system operations. Currently no plug-ins           #

#          exist for file system operations but we should start seeing community based plug-ins for integrating file systems soon           #

#                                                                                                                                                                 #

# APP_IGNORE_ERROR - (Y|N) Will cause Snap Creator to not exit when encountering an application error. An error                                #

#              message will be sent if SENDTRAP is configured but Snap Creator will not exit. This may be useful if you                     #

#              are backing up multiple databases and dont want a single database failure to stop the backup                                          #

#                                                                                                                                                                 #

# APP_DEFINED_BACKUP - (Y|N) The application plugin will be expected to perform entire backup operation including quiesce,           #

#                              snapshot, and unquiesce. The built-in plugins do not support this kind of backup.                               #

#                                                                                                                                                                 #

# VALIDATE_VOLUMES - (DATA) Snap Creator validates that all volumes where the database resides are in fact part of the backup.           #

#          Currently, there are some limitations. Only NFS is supported and only for db2, maxdb, mysql, and Oracle.                     #

#          Currently, this option only checks data files only for the above databases. Going forward, support for more data            #

#          types like LOG will be added.                                                                                                                         #

#                                                                                                                                                                 #

# META_DATA_VOLUME - Allows for snapshot of specified volume to occur after unquiesce. This can be valuable for certain plugins           #

#                         where data snapshot should occur at different times. The meta data volume must not be only volume specified #

#                         ie: controller1:volume1                                                                                                               #

#                                                                                                                                                                  #

# APP_DEFINED_RESTORE - (Y|N) The normal cli restore interface will not be shown. Instead the plug-in is responsible for            #

#                    handling all restore activities including the restore of the snapshot. The built-in plug-ins do not support           #

#                    this type of a restore                                                                                                                         #

#                                                                                                                                                                 #

# APP_DEFINED_CLONE - (Y|N) The built-in cloning abilities of Snap Creator will be ignored. Instead the plug-in is responsible           #

#                    for handling all clone activities including vol or lun clone creation and deletion. The built-in plug-ins do not #

#                    support this type of clone.                                                                                                               #

#                                                                                                                                                                 #

# APP_DEFINED_MOUNT - (Y|N) The built-in mount abilities of Snap Creator will be ignored. Instead the plug-in is responsible           #

#                    for handling all mount activities including vol or lun clone creation. The built-in plug-ins do not support           #

#                    this type of mount.                                                                                                                          #

#                                                                                                                                                                 #

# APP_DEFINED_UMOUNT - (Y|N) The built-in umount abilities of Snap Creator will be ignored. Instead the plug-in is responsible           #

#                    for handling all umount activities including vol or lun clone deletion. The built-in plug-ins do not support           #

#                    this type of umount.                                                                                                                          #

#                                                                                                                                                                 #

# APP_AUTO_DISCOVERY - (Y|N) Similar to APP_DEFINED _RESTORE this parameter allows the plug-in to handle application discovery.           #

#                    As with restore the plug-in must handle this operation itself                                                                       #

#                                                                                                                                                                 #

# APP_CONF_PERSISTENCY - (Y|N) If APP_AUTO_DISCOVERY is used configuration parameters can be changed dynamically. This setting           #

#                    allows any changes to be saved, meaning the configuration file updated dynamically.                                         #

#                                                                                                                                                                 #

# JAVA_HOME - (Text) Setting which points to the Java Virtual Machine which should be used for executing .class and .jar files.  #

#                    If set, $JAVA_HOME/bin/java will be used, otherwise just java to run the .class/.jar file                   #

#                                                                                                                                                                 #

# JVM_ARGS - (Text) Setting for controlling the Java Virtual Machine when executing native Java .class or .jar files. The        #

#                   default setting is "-Xms32M -Xmx128M"                                                                        #

#                                                                                                                                                                 #

# JAVA_CLASSPATH - (Text) Setting which defines the Java classpath. Per default, plugins/native is configured and can be         #

#                         completed with this environment variable, which will be appended to the default.                       #

#                                                                                                                                                                 #

# PERL_HOME - (Text) Setting which points to the Perl interpreter which should be used for executing .pl files.                  #

#                    If set, $PERL_HOME/bin/perl will be used, otherwise just perl to run the .pl file                           #

#                                                                                                                                                                 #

# PERL_OPTS - (Text) Setting for controlling the Perl interpreter when executing native Perl files.                              #

#                    Options for settings additional include directories (-I) etc. can be passed to the Perl interpreter.        #

#                                                                                                                                                                  #

# PYTHON_HOME - (Text) Setting which points to the Python interpreter which should be used for executing .py files.              #

#                      If set, $PYTHON_HOME/python will be used, otherwhise just python to run the .py file                      #

#                                                                                                                                                                 #

# PYTHON_OPTS - (Text) Setting for controlling the Python interpreter when executing native Python files.                        #

##################################################################################################################################

APP_NAME=smsql

FS_NAME=

APP_IGNORE_ERROR=N

APP_DEFINED_BACKUP=N

APP_DEFINED_RESTORE=N

APP_DEFINED_CLONE=N

APP_DEFINED_MOUNT=N

APP_DEFINED_UMOUNT=N

APP_AUTO_DISCOVERY=N

APP_CONF_PERSISTENCE=Y

VALIDATE_VOLUMES=

META_DATA_VOLUME=

JAVA_HOME=

JVM_ARGS=

JAVA_CLASSPATH=

PERL_HOME=

PERL_OPTS=

PYTHON_HOME=

PYTHON_OPTS=

################################

### SnapManager SQL Settings ###

################################

##################################################################################################

# SMSQL_PS_CONF - Path to the powershell configuration file for SMSQL                            #

#                                                                                                                         #

#   SMSQL_PS_CONF="C:\Program Files\SnapManager for SQL Server\smsqlShell.psc1"                                #

#                                                                                                                         #

# SMSQL_BACKUP_OPTIONS - SMSQL backup options, Snap Creator uses a powershell new-backup cmdlet           #

#                                                                                                                         #

#   SMSQL_BACKUP_OPTIONS=-svr 'SQL'  -d  'SQL\SHAREPOINT', '1', 'WSS_Content' -RetainBackups  7  #

#                        -lb -bksif -RetainSnapofSnapInfo 8 -trlog  -gen -mgmt standard                     #

#                                                                                                                         #

# SMSQL_SERVER_NAME - SMSQL server name                                                          #

# SMSQL_32bit - (Y|N) Setting to enable use of 32bit version of powershell                       #

##################################################################################################

SMSQL_PS_CONF="C:\Program Files\NetApp\SnapManager for SQL Server\smsqlShell.psc1"

SMSQL_BACKUP_OPTIONS=–svr '%%SERVERNAME%%'  -mp  –mpdir 'C:\Program Files\NetApp\SnapManager for SQL Server\SnapMgrMountPoint' -RetainBackupDays  14 -lb -bksif -RetainSnapofSnapInfoDays 7 -trlog –mgmt standard

SMSQL_SERVER_NAME=%%SERVERNAME%%

SMSQL_32bit=N

robert_updegraff
3,546 Views

My other question is what configuration needs to be done to the agent? I have this in the config;

############################################

### SnapCreator Agent Configuration File ###

############################################

######################################################################

### Command to allow or wildcard "*" can be used to allow anything ###

######################################################################

host: scServer@*

command: powershell

spinks
3,546 Views

Robert,

By default I don't think that you need any change to the agent config file.

Snap Creator knows about SME commands because they are part of the plug-in.

Can you provide us with a debug log file so we can see what the issue is?

You state that the job runs but does nothing - the logs will help us know what Snap Creator is calling and if the commands are successful or not.

We need to see what Snap Creator is or is not doing to help you further.

Thanks,

John

spinks
3,546 Views

If you don't want to provide here for privacy reasons you can also feel free to email me the log file or scdump - spinks -at- netapp -dot- com

Thanks,

John

Public