Link to home
Start Free TrialLog in
Avatar of Shark Attack
Shark Attack

asked on

Moving files on router

How can I move a file from NVRAM on router 2811 to USB thumb drive? The thumb drive is functional on the router. I just need a command to move it.
Avatar of Don Johnston
Don Johnston
Flag of United States of America image

copy nvram usbflash#  (where # is the usb slot number. Should be 1).

But what "file" do you have in NVRAM?  Typically, the only file in NVRAM is statup-config.  In which case "copy startup usbflash1" will do the trick.
Avatar of Shark Attack
Shark Attack

ASKER

I was moving some stuff from external router to my router, there is a config file I need from there. Thats was the only way for me to transfer files across different routers.
Please keep in mind that some of the routers will not support USB and or the installed IOS may not recognize a USB drive. So please verify this against your device via the Cisco Support site.

When you first plug in the USB drive it is unrecognized and will have to be formatted to FAT as Cisco IOS only recognizes the FAT file system.

Although you can format it on your pc as FAT you can also do it from the router.

Router# format ?
  flash:      Filesystem to be formatted
  usbflash1:  Filesystem to be formatted
Router# format usbflash1:
Format operation may take a while. Continue? [confirm]
Format operation will destroy all data in "usbflash1:".  Continue? [confirm]
Format: Drive communication & 1st Sector Write OK...
Format: All system sectors written. OK...
Format: Total data sectors in formatted partition: 8191435
Format: Total data bytes in formatted partition: -100952576
Format: Operation completed successfully.
Format of usbflash1 complete
Router#

Do a DIR to validate it.

Router# dir usbflash1:
Directory of usbflash1:/
No files in directory
No space information available
Router#

Next just copy your IOS over like so
Router# dir
Directory of flash:/

    2  -rwx    17227284   Aug 8 2011 17:16:53 +00:00  c870-advipservicesk9-mz.124-11.T2.bin

    3  -rwx        3054  Aug 8 2011 20:24:58 +00:00  SDM_Backup

23482368 bytes total (6246400 bytes free)

Router# copy c2800nm-ipbasek9-mz.124-23.bin usb

Router# copy c2800nm-ipbasek9-mz.124-23.bin usbflash1:

Destination filename [c2800nm-ipbasek9-mz.124-23.bin]?

Copy in progress...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC

18755464 bytes copied in 19.440 secs (1193025 bytes/sec)
Router#

Finally, do a DIR to confirm

Router# dir usbflash1:
Directory of usbflash1:/
    1  -rw-    18755464  Aug 8 2011 12:25:18 +00:00  c2800nm-ipbasek9-mz.124-23.bin
No space information available
Router#

You're all set and can take the drive with you wherever you go :)
HTH
-Rafael
Still not following you on the NVRAM part. If you're trying to copy the startup-config to a USB port, "copy start usbflash" will work. If you have multiple files in NVRAM, I don't know how you did that since NVRAM is relatively small. If you need to copy files, most people use the flash filesystem for that.
sorry, i meant to say flash, I was coping files from external router to my routers flash. Now, I need to copy that file from flash to USB.
ASKER CERTIFIED SOLUTION
Avatar of Don Johnston
Don Johnston
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That worked Don. thanks,

Rafael, I have 2811 everywhere. Looks like a USB compatible model
Zack,
If you compare what I posted versus what Don posted you will see they are the same minus the bin files and hostname. I removed them from the post.

Either way I'm glad you were able to get it resolved.