CUCM Backup and Recovery via Command Line

Aurus Blog

This blog is to share our expertise in Cisco UCM, UCCX/UCCE and Cisco Meeting Server

  • Archive

    «   March 2024   »
    M T W T F S S
            1 2 3
    4 5 6 7 8 9 10
    11 12 13 14 15 16 17
    18 19 20 21 22 23 24
    25 26 27 28 29 30 31
                 

CUCM Backup and Recovery via Command Line

Cisco Unified Communications Manager (CUCM) graphic interface has a Disaster Recovery System (DRS) for backup creation and system restore. But sometimes GUI is unavailable, for example, because of network problems. In this case, backup and restore can be performed via CLI. In this article, we’ll tell you how to do that.

Backup Creation

Before this procedure you have to configure a SFTP server to store the CUCM backup there.

First of all, add a server to store the backup. Execute the following command:

utils disaster_recovery device add network [backup_device_name path] [server_name/ip_address] [username] [number_of_backups]

  • backup_device_name – name of the device to store the backup;
  • path – path to the backup on this device;
  • server_name/ip_address – hostname or IP address of the device;
  • username – username to be used to access the server;
  • number of backups – number of backups to be created.

After this command, you’ll be prompted to enter the password for the accessing user (in our case the user is ccmadmin):

admin: utils disaster_recovery device add network backupdevice ./ 10.20.30.123 ccmadmin
Please enter password to connect to network server 10.20.30.123:****
drfCliMsg: Backup Device has been saved successfully.

Use the following command to make sure the backup device has been successfully added:

utils disaster_recovery device list

You should see the device you have added:

admin:utils disaster_recovery device list
Device Name    Device Type    Device Path
--------------------------------------------------------------
backupdevice    NETWORK    ./

Wonderful! Now you can perform the backup. Use the following command:

utils disaster_recovery backup network [featurelist] [path] [backup_device_name] [username]

  • backup_device_name – the hostname or IP address of the device where the backup will be stored;
  • username – username to be used to access the server;
  • featurelist – the list of features for the copy;
  • path – path to the archive.

To show the list of features available for backup, use the following command:

utils disaster_recovery show_registration [servername],

where servername specifies the server for which you want to display the information.

admin:utils disaster_recovery backup network UCM,CDR_CAR,PLM backupdevice
drfCliMsg: Backup initiated successfully. Please run 'utils disaster_recovery status backup' command to see the status

Done! To check the backup status, enter:

utils disaster_recovery status backup

admin:utils disaster_recovery status backup

Status: SUCCESS :Backup Completed...
Tar Filename: 2019-10-12-04-21-37.tar
Storage Location: NETWORK
Operation: backup
Percentage Complete: 100
PLM CCM01 ELM-AGENT SUCCESS Sat Oct 12 04:17:25 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_b_ ccm01_plm_elm-agent.log
PLM CCM01 ELM-SERVER SUCCESS Sat Oct 12 04:17:26 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_b_ ccm01_plm_elm-server.log
CDR_CAR CCM01 CAR SUCCESS Sat Oct 12 04:17:27 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_b_ ccm01_cdr_car_car.log
UCM CCM01 BAT SUCCESS Sat Oct 12 04:19:23 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_b_ ccm01_ucm_bat.log
UCM CCM01 CCMPREFS SUCCESS Sat Oct 12 04:19:25 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_b_ ccm01_ucm_ccmprefs.log
UCM CCM01 PLATFORM SUCCESS Sat Oct 12 04:19:30 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_b_ ccm01_ucm_platform.log
UCM CCM01 TCT SUCCESS Sat Oct 12 04:19:34 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_b_ ccm01_ucm_tct.log
UCM CCM01 SYSLOGAGT SUCCESS Sat Oct 12 04:19:35 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_b_ ccm01_ucm_syslogagt.log
UCM CCM01 CDPAGT SUCCESS Sat Oct 12 04:19:36 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_b_CCM01_ucm_cdpagt.log
UCM CCM01 CLM SUCCESS Sat Oct 12 04:19:37 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_b_ ccm01_ucm_clm.log
UCM CCM01 CCMDB SUCCESS Sat Oct 12 04:19:37 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_b_ ccm01_ucm_ccmdb.log
UCM CCM01 TFTP SUCCESS Sat Oct 12 04:21:37 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_b_ ccm01_ucm_tftp.log
UCM CCM01 ANN SUCCESS Sat Oct 12 04:21:33 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_b_ ccm01_ucm_ann.log
UCM CCM01 MOH SUCCESS Sat Oct 12 04:21:34 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_b_ccm01_ucm_moh.log

That's it, the backup is ready!

Recovery Procedure

To recover CUCM configuration from a backup, first of all, check the backup files available of the remote server:

admin:utils disaster_recovery show_backupfiles backupdevice
2019-10-12-04-21-37
2018-12-25-21-52-19

Select the required backup and enter the following command:

admin:utils disaster_recovery restore network 10.20.30.123 2019-10-12-04-21-37 backupdevice
drfCliMsg: WARNING! There are nodes in current production cluster but NOT present in the backup. These nodes will be removed if you restore the Publisher. If you want to keep these nodes, you will need to manually re-add them after the restore.
Do you want DRS to perform a SHA-1 File Integrity Check of your backup archives y/n ?(n) : y
Please enter the comma seperated features you wish to restore. Valid features for server CCM01 are PLM,CDR_CAR,UCM:PLM,CDR_CAR,UCM
Do you want to restore database from the subscriber y/n ?(n) : n
drfCliMsg: Restore initiated successfully. Please run 'utils disaster_recovery status restore' command to see the status
ALERT: Please restart the server(s) before performing the next restore for changes to take effect. In case of a cluster, restart the entire cluster.

Now check the recovery status:

admin:utils disaster_recovery status restore

Status: SUCCESS :Restore Completed...
Tar Filename: 2019-10-12-04-21-37.tar
Storage Location: NETWORK
Operation: restore
Percentage Complete: 100
CDR_CAR CCM01 CAR SUCCESS Sun Oct 13 11:20:15 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_r_ccm01_cdr_car_car.log
PLM CCM01 ELM-AGENT SUCCESS Sun Oct 13 11:24:34 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_r_ccm01_plm_elm-agent.log
PLM CCM01 ELM-SERVER SUCCESS Sun Oct 13 11:24:34 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_r_ccm01_plm_elm-server.log
UCM CCM01 BAT SUCCESS Sun Oct 13 11:25:06 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_r_ccm01_ucm_bat.log
UCM CCM01 CCMPREFS SUCCESS Sun Oct 13 11:37:06 CEST 2019 activelog/platform/drf/log/2019-10-12-15-20-01_r_ccm01_ucm_ccmprefs.log
UCM CCM01 PLATFORM SUCCESS Sun Oct 13 11:37:13 CEST 2019 activelog/platform/drf/log/2019-10-12-15-20-01_r_ccm01_ucm_platform.log
UCM CCM01 TCT SUCCESS Sun Oct 13 12:11:10 CEST 2019 activelog/platform/drf/log/2019-10-12-15-20-01_r_ccm01_ucm_tct.log
UCM CCM01 SYSLOGAGT SUCCESS Sun Oct 13 12:14:19 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_r_ccm01_ucm_syslogagt.log
UCM CCM01 CDPAGT SUCCESS Sun Oct 13 12:14:39 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_r_ccm01_ucm_cdpagt.log
UCM CCM01 CLM SUCCESS Sun Oct 13 12:17:03 CEST 2019 activelog/platform/drf/log/2019-10-12-04-21-37_r_ccm01_ucm_clm.log
UCM CCM01 CCMDB SUCCESS Sun Oct 13 12:17:05 CEST 2019 activelog/platform/drf/log/2019-02-16-04-21-37_r_ccm01_ucm_ccmdb.log
UCM CCM01 TFTP SUCCESS Sun Oct 13 12:25:12 CEST 2019 activelog/platform/drf/log/2019-02-16-04-21-37_r_ccm01_ucm_tftp.log
UCM CCM01 ANN SUCCESS Sun Oct 13 12:26:38 CEST 2019 activelog/platform/drf/log/2019-02-16-04-21-37_r_ccm01_ucm_ann.log
UCM CCM01 MOH SUCCESS Sun Oct 13 12:26:39 CEST 2019 activelog/platform/drf/log/2019-02-16-04-21-37_r_ccm01_ucm_moh.log