cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5141
Views
9
Helpful
6
Replies

TFTP Server Backup or Copy-Paste Configuration ?

Anup Sasikumar
Level 1
Level 1

Hi ,

I normally take bacup of all network devices in the infrastructure - ASA /Switches , using a TFTP Server? But lets say , If I copy paste all the configuration contents to a text file and remove the txt extension , would it be the same ? Would such a file when restored to the device work as desired ?

Please help.

Regards,

Anup Sasikumar

Regards,
Anup
1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hello Anup,

I assume that you are talking about creating a backup of the running configuration that could in future be used as the startup-config file.

In theory, it should work. You would need to be very careful, though, about not mixing the show running-config with any other text that could appear on the screen, such as logging messages, the --More-- prompts etc. Also, by default, the text files produced by Cisco IOS use Unix-type EOL (the #LF character) instead of DOS-type EOL (#CR#LF). If you capture and store the running-config output under Windows, it will most probably be stored using DOS-type EOLs. You will need to verify if such file will be correctly processed as startup-config during device bootup.

Best regards,

Peter

View solution in original post

6 Replies 6

Peter Paluch
Cisco Employee
Cisco Employee

Hello Anup,

I assume that you are talking about creating a backup of the running configuration that could in future be used as the startup-config file.

In theory, it should work. You would need to be very careful, though, about not mixing the show running-config with any other text that could appear on the screen, such as logging messages, the --More-- prompts etc. Also, by default, the text files produced by Cisco IOS use Unix-type EOL (the #LF character) instead of DOS-type EOL (#CR#LF). If you capture and store the running-config output under Windows, it will most probably be stored using DOS-type EOLs. You will need to verify if such file will be correctly processed as startup-config during device bootup.

Best regards,

Peter

Thank you for your response Peter.

That was indeed very helpful .

I was going through the two files - The TFTP backup file and the renamed .txt file

( I used  telnet [ip] -f [path][filename.txt] command to get the telnet output to a text file , so I could not see any ----More----- prompts. But I think if I had done a mere copy paste I would have got that as well on the file. I have also removed all the hostname like ASA5505# from the file. )

1. The only difference I see on the TFTP file is an extra line on top which says

    " Written by enable_15 at 20:08:44.812 UTC Fri Oct 12 2012"

I could not find it in the #sh run output file . Would it be a problem ?

2. I had enabled service password encryption. So all the passwords were showing as encrypted meaningless ones which is same in both the files.   Would I be getting back the same when I restore ?

3. Just out of curiosity , could you please help me with the significance of " ! " that seen in configurations ?

Many Thanks ,

Anup

Regards,
Anup

Hello Anup,

You are welcome.

( I used telnet [ip] -f [path][filename.txt] command to get  the telnet output to a text file , so I could not see any ----More-----  prompts. But I think if I had done a mere copy paste I would have got  that as well on the file. I have also removed all the hostname like  ASA5505# from the file. )

I see. That seems to be a Windows-based telnet, am I correct? Regarding the ---More--- prompts, you can also use the terminal length 0 command that tells the router/switch to stop paginating the output (the terminal has infinite length).

1. The only difference I see on the TFTP file is an extra line on top which says

    " Written by enable_15 at 20:08:44.812 UTC Fri Oct 12 2012"

I could not find it in the #sh run output file . Would it be a problem ?

If the line starts with the ! exclamation mark (I do not see it here), this line is irrelevant. Every line starting with ! is considered a remark and is completely ignored.

2. I had enabled service password encryption. So all the passwords were  showing as encrypted meaningless ones which is same in both the files.    Would I be getting back the same when I restore ? 

Yes, the passwords will be correctly stored and imported. They will remain encrypted all the time, however.

3. Just out of curiosity , could you please help me with the significance of "!" that seen in configurations ? 

The exclamation mark is a symbol that tells the router/switch/ASA to ignore the subsequent text till the end of the line. These ! symbols are used to put textual explanations or comments into the configuration files. They also appear in the running-config to somewhat improve its readability (the running-config is generated by a process asking all IOS subsystems to produce their current configuration in text form, resulting into the complete running-config. Many of these subsystems separate their output using the ! marks).

Best regards,

Peter

You are awesome, Peter !

It was very expalinatory and it sure helped me understand more.

We have an secondary ASA5505 which is currently not being used in the infrastructure. I will check if the renamed text file works and will let you know !

Many Thanks,

Anup

Regards,
Anup

Hi Anup,

Thank you very much And I am looking forward to knowing if the ASA liked the Windows-saved configuration file.

Take care!

Best regards,

Peter

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The    Author of this posting offers the information contained within this    posting without consideration and with the reader's understanding that    there's no implied or expressed suitability or fitness for any  purpose.   Information provided is for informational purposes only and  should not   be construed as rendering professional advice of any kind.  Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In    no event shall Author be liable for any damages whatsoever  (including,   without limitation, damages for loss of use, data or  profit) arising  out  of the use or inability to use the posting's  information even if  Author  has been advised of the possibility of such  damage.

Posting

One other difference you might notice, on many Cisco devices, when you save a config file via the copy command (e.g TFTP, FTP, RCP), the text may not have each line terminated with CRLF, as it likely will if you copy/paste.  If you open such a file with Windows notepad, text will appear run together.  Windows Wordpad will present file correctly (it can also easily save it with CRLF).  (Note:either format [i.e. with or without CRLF] can be [e.g. TFTP] copied onto the Cisco device.)

Review Cisco Networking for a $25 gift card