cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
23002
Views
0
Helpful
16
Replies

how to backup a "show tech" and a "running config" from MDS switches

ivy_yangxiaohua
Level 1
Level 1

hi, guys

I am a newbie of MDS switches.

but I got a request this week asking me to actively backup a "show tech" and a "running config" from the MDS switches........

so my questions are:

1) if I want to back up MDS configurations, which commnds should I run? or just "show tech" is enough?

2) is the MDS itself have the backup function? for example can ftp the configuration to someplace?

please help point me the right direction or is there any official referece docs I can refer to ?

thanks in advance!!!

2 Accepted Solutions

Accepted Solutions

dynamoxxx
Level 5
Level 5

1) to backup MDS configuration you want to run this command:

copy running-config

and then you have multiple options where you can send it to for example you could tftp it

copy running-config tftp://yourftpserver/mdsbackup.txt

2) i don't believe there is a native solution that performs scheduled backups but it's say easy to write a little bash/perl script.

@dynamoxxx

@dynamoxxx

View solution in original post

Hi,

There is an example of a scheduled backup here on page 1-15 (adobe page 31)

http://www.cisco.com/en/US/docs/storage/san_switches/mds9000/sw/rel_3_x/cookbook/MDScookbook31.pdf

Regards,

David

View solution in original post

16 Replies 16

dynamoxxx
Level 5
Level 5

1) to backup MDS configuration you want to run this command:

copy running-config

and then you have multiple options where you can send it to for example you could tftp it

copy running-config tftp://yourftpserver/mdsbackup.txt

2) i don't believe there is a native solution that performs scheduled backups but it's say easy to write a little bash/perl script.

@dynamoxxx

@dynamoxxx

Thank you so much dynamoxxx! so the current problem is how to schedulely run this command on the MDS.......but I don't believe there is crontab on the MDS. May need to use expect to log in MDS automactically and run the command to back up the mds config to a target location.

Hi,

There is an example of a scheduled backup here on page 1-15 (adobe page 31)

http://www.cisco.com/en/US/docs/storage/san_switches/mds9000/sw/rel_3_x/cookbook/MDScookbook31.pdf

Regards,

David

Thank you so much dakester! This is exactly what I am looking for!! I will try it on our environment next week.

problem that i have with using automated scheduler from MDS, you can't add any error checking. If your tftp server is down you will not get any alerts, you will think backups are happening but in reality a change on your tftp server broke your backup strategy.

@dynamoxxx

@dynamoxxx

thanks for your kindly reminder Dynamoxxx

I cured the "no backup happened" by running a script (assuming your tftp is linux/unix) via crontab that checks for a file with the right name and >0 bytes (actually went to higher number after some use history)

yeah, that's right, we indeed can monitor the file size on the target tftp location.......

but my current issue is that switch can't connect with my tftp server.......

I just pick up a linux box of the same network section as tftp server....so there is no firewall blocking

but not sure if I need to make some tftp configuration on this linux box.....

so I am still digging~~~

lasfswcor01(config)# copy startup-config  tftp://10.119.9.90/home/iyang

Trying to connect to tftp server......

Connection to server Established. Copying Started.....

TFTP put operation failed:Connection timed out

I want to use scp way since it uses TCP and requires 22 port only.

but scp requires login usename and password, so it is interactive way ...

so I am wondering if I can put both username and password in the command line?

then I can use Scheduler for scp way.........

lasfswcor01# copy startup-config scp://root@10.119.9.90/home/iyang   

The authenticity of host '10.119.9.90 (10.119.9.90)' can't be established.

RSA key fingerprint is 69:d0:55:fe:db:fd:79:7a:65:94:dc:d6:cc:15:e4:75.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '10.119.9.90' (RSA) to the list of known hosts.

root@10.119.9.90's

password:

lasfswcor01-startup-config                                                                        100%  727KB 727.4KB/s   00:00

after configure the tftp server now I can backup our mds config via tftp+scheduler now!!!

thanks everybody for your help!!

really appreciate for your help!!

Is there a way to schedule a job using FTP instead of TFTP. If I use this command by itself, without the scheduler, it prompts for a password ( copy startup-config ftp://10.1.1.1/MDS_Bkup/DowMDS_$(TIMESTAMP).txt ) . When I try to use the scheduler, it doesn't work. How can I input username and password into command? I also used below and that didn't work.

ip ftp username user

ip ftp password password

can you use tftp or sftp as your backup target ?

@dynamoxxx

@dynamoxxx

tftp worked for me but not ftp. My ftp requires a password and I don't know how to send it via scheduler job.

Worked:

scheduler job name BkupConfig

  copy running-config startup-config

  copy startup-config tftp://10.1.1.1/MDS_Bkup/DowMDS$(TIMESTAMP).txt

scheduler schedule name Weekly_5am

  job name BkupConfig

  time weekly 01:05:00

FAILED FTP:

Job Name       : test                              Job Status: Success (0)

Schedule Name  : test                              User Name : user

Completion time: Thu Sep  5 11:08:41 2013

--------------------------------- Job Output ---------------------------------

`copy running-config startup-config`

[###                                     ]   6%

[######                                  ]  12%

[########                                ]  19%

[###########                             ]  25%

[##############                          ]  32%

[################                        ]  39%

[###################                     ]  45%

[######################                  ]  51%

[########################                ]  59%

[###########################             ]  65%

[#############################           ]  71%

[################################        ]  79%

[###################################     ]  85%

[#####################################   ]  91%

[########################################]  98%

[########################################] 100%

Copy complete, now saving to disk (please wait)...

`copy startup-config

ftp://user@10.1.1.1/MDS_Bkup/DowMDS2013-09-05-10.53.05.txt

`

Password: Login failed.

old thread, i know.... but to pre-load the credentials for the scheduled FTP job, use

ip ftp username kewldude

ip ftp password P@ssword1

So I labbed this up and if you have service password-encryption enabled, the password is encrypted with the sucky '7' style hashing. However, just make sure this password is only used for this function. Will prevent shoulder surfers. Additionally, make sure the FTP user only has write capability.
It should be noted that FTP isn't encrypted in transit but it's still better than TFTP.

This is cool because Windows doesn't have a built in TFTP function, but you can add an FTP server. Additionally, IIS lets you restrict the IP addresses that can access

Review Cisco Networking for a $25 gift card