cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
configure & troubleshoot anyconnect

UCSM Configuration Backup/Restore (Import) on UCS Platform Emulator 3.1(1ePE1)

5467
Views
17
Helpful
3
Comments
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)

(view in My Videos)

3 Comments
Beginner

Why is the video so blurry expanded? Can you share the command to run using the ucsbackup.py file since the video is either too tiny to watch (visible text) or too blurry?

Cisco Employee

Hi Dominic,

Sorry about the poor video quality.  You can backup and import configs in the UCSM GUI, or using the script above the command line is the following:

python ucsbackup.py

Note that for the above command line to work, you will want to edit this line:

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

to use the ip, username, and password of your emulator instance.  Here's an example:

handle = ucshandle.UcsHandle('10.0.1.100', 'ucspe', 'ucspe', secure=True)

Let me know of other questions.

Cisco Employee

Great Script and procedure.  It works great.

Thanks for posting it!

Thank you.

CreatePlease to create content
Content for Community-Ad
June's Community Spotlight Awards