Cisco Collaboration 101-3: download MoH file from CUCM TFTP server

When you administrate Cisco CUCM, often there is a situation where you have to locate a file and download the file from CUCM server, particularly from the CUCM TFTP and MOH servers.

OK, first, here is an example of ‘file get’ command to download an xml file from a CUCM TFTP server.

admin:file get tftp /WLANDefault.xml
Please wait while the system is gathering files info …done.
Sub-directories were not t*raversed.
Number of files affected: 1
Total size in Bytes: 21768
Total size in Kbytes: 21.257812
Would you like to proceed [y/n]? y
SFTP server IP: 10.168.46.2
SFTP server port [22]:
User ID: administrator
Password: ********

Download directory: /

The authenticity of host ‘192168.46.2 (192168.46.2 )’ can’t be established.
RSA key fingerprint is 08:39:1b:80:c5:e4:c1:60:de:5c:5b:3a:7d:be:8a:ae.
Are you sure you want to continue connecting (yes/no)? yes
.
Transfer completed.
admin:

=====================================================================

Now here is a list of ‘file list’ command sets.

admin:file list
file list activelog
file list inactivelog
file list install
file list license
file list partBsalog
file list salog
file list tftp

We have to snoop around to locate where our hidden MoH files are and it is under “activelog /mohprep” folder:

admin:file list activelog /*
<dir> audit
<dir> car_db
<dir> ccm_db
<dir> cm
<dir> core
<dir> dp_db
<dir> installed_options
<dir> mgetty
<dir> mohprep
<dir> patches
<dir> platform
<dir> sa
<dir> syslog
<dir> tomcat
dir count = 14, file count = 0
admin:file list activelog mohprep /*
CiscoMOHSourceReport.xml SampleAudioSource.alaw.wav
SampleAudioSource.g729.wav SampleAudioSource.ulaw.wav
SampleAudioSource.wb.wav SampleAudioSource.xml
SilenceAudioSource.alaw.wav SilenceAudioSource.g729.wav
SilenceAudioSource.ulaw.wav SilenceAudioSource.wb.wav
SilenceAudioSource.xml
dir count = 0, file count = 11
admin:file list activelog syslog ?
Syntax:
file list activelog file-spec [options]
file-spec mandatory file to view
options optional page|detail|reverse|[date|size]

Let’s also look at what is under active syslog folder:

admin:file list activelog syslog /*
AlternateSyslog CiscoSyslog
CiscoSyslog.1 CiscoSyslog.2
CiscoSyslog.3 CiscoSyslog.4
boot.log boot.log.ori
cron cron.1
cron.2 maillog
messages messages.1
messages.2 messages.3
messages.4 messages.ori
notify.sh.log ntp_start.sh.log
ntp_validate_servers.sh.log ntpd.log
sd_ntp.log secure
secure.1 secure.2
secure.3 secure.4
secure.ori setkeysdetails.sh.log
spooler
dir count = 0, file count = 3

======================================================================

Now if you found what you are looking for in an active MoH folder, go ahead and run “file get activelog /mohprep/[name of your MoH file]”:

admin:file get activelog /mohprep/ECM-MOH-Bunnings-Aug-2015.ulaw.wav
Please wait while the system is gathering files info …done.
Sub-directories were not traversed.
Number of files affected: 1
Total size in Bytes: 1728822
Total size in Kbytes: 1688.3027
Would you like to proceed [y/n]? y
SFTP server IP: 10.171.217.110
SFTP server port [22]:
User ID: cisco
Password: *********

Download directory: /

.
Transfer completed.

======================================================================
admin:file list activelog /mohprep/SampleAudioSource-test.ulaw.wav
SampleAudioSource-test.ulaw.wav
dir count = 0, file count = 1
admin:file get activelog /mohprep/SampleAudioSource-test.ulaw.wav
Please wait while the system is gathering files info …done.
Sub-directories were not traversed.
Number of files affected: 1
Total size in Bytes: 2702728
Total size in Kbytes: 2639.3828
Would you like to proceed [y/n]? n
Files transfer cancelled.
admin:file get activelog /mohprep/SampleAudioSource -test.ulaw.wav
Invalid command, a dash character must be preceded by an alphanumeric character

admin:file get activelog /mohprep/SampleAudioSource test.ulaw.wav
Missing file-spec or invalid command option specified.
Valid options: [reltime|abstime][match][compress]
admin:

The issue with the space seems to match defect CSCsr43052: http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&bugId=CSCsr43052

Advertisements

Yo Gabba Gabba Cool Tricks 1: Backup your data on failing OS (Windows/Linux)

One of my colleagues at work has asked me if I can help him to back-up/recovery some data (72.6Gb on 320GB HDD) from a laptop running Windows 7 which held very important data for his cousin’s tax return documents. He has described the symptom as “The laptop will not boot up properly due to Windows boot-up file corruption or some sort, also the hard disk cannot be recognized when connected via Sata to USB coverter or Sata to motherboard as a second HDD. The HDD wasn’t completely dead and plates spindling.”

Unfortunately, the Hard disk was 320GB in size but was only partitioned into a single partition, so both OS and data resided on the same partition. I have tried my usual tricks on both Windows and Linux OS and the damn HDD cannot be detected hence, I was unable to back-up any data from this failed hard disk, then a little bit of googling pointed me to this URL: http://www.sevenforums.com/tutorials/256518-peppermint-live-cd-dvd-usb-create-emergency-backup.html. Wow! what a cool way to recover your data!!! This data back-up method can be used in both Windows and Linux data recovery. Thanks to the Author who documented the recovery process, it worked like magic on the First GO!

Step 1: Find an old USB flash drive

*I am using an old 2GB USB drive 🙂

Old 2GB USB

Step 2: Download your OS from the following site:

http://peppermintos.com/

*32bit OS will do the job just fine, do not bother with 64bit OS.

Step 3: Download Lufus bootable USB maker from the following link and make a bootable usb using above two:

https://rufus.akeo.ie/

Step 4: Run Peppermint OS from the usb itself, running in live OS mode, connect an external USB storage and start data backing up/recovery

backup

Keep your bootable usb handy all times and have a fun!