cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
9631
Views
17
Helpful
4
Comments
dsoper
Cisco Employee
Cisco Employee

Here is a brief introduction to the new 3.1(1ePE1) UCS Platform Emulator showing how to perform backup and restore(import) of the current UCSM configuration.  Backup/restore of the configuration is a good practice in general and is necessary with the new Platform Emulator since UCSM configuration state is lost on Platform Emulator resets.

 

The UCSM GUI, CLI, PowerTool for UCS, and/or the PythonSDK can be used to perform backup/restore operations.  This video uses the PythonSDK, which is in beta and currently available on GitHub.

 

Backup operations in the video are done with backup_ucs().  Here's a code snippet:

 

from ucsmsdk import ucshandle

from ucsmsdk.utils.ucsbackup import backup_ucs

<snip>

        handle = ucshandle.UcsHandle(settings.ip, settings.user, settings.pw, secure=settings.secure)

        handle.login()

        fname = raw_input('Enter filename for backup (current directory): ')

        backup_ucs(handle, backup_type="config-all", file_dir="./", file_name=fname)

 

Restore (import) operations are done with import_ucs_backup():

 

from ucsmsdk import ucshandle

from ucsmsdk.utils.ucsbackup import import_ucs_backup

<snip>

        handle = ucshandle.UcsHandle(settings.ip, settings.user, settings.pw, secure=settings.secure)

        handle.login()

        fname = raw_input('Enter filename for import (current directory): ')

        import_ucs_backup(handle, file_dir="./", file_name=fname)

4 Comments
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: