cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
47827
Views
86
Helpful
9
Replies

copy all files from a flash

jjoseph01
Level 3
Level 3

Hi all.  I am trying to copy all files from a flash: on a CME to a usbflash drive.  I am able to do so, but only one at a time.  Is there a away to copy all files at one time so I dont have to name them individually when copying all of them over?  Thanks.

9 Replies 9

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

As far as I know, there in no such command on the router that you can use to do massive copy and paste.

HTH

Reza

Leo Laohoo
Hall of Fame
Hall of Fame

Try "copy flash:. usbflash0:".

Ganesh Hariharan
VIP Alumni
VIP Alumni
Hi all.  I am trying to copy all files from a flash: on a CME to a
usbflash drive.  I am able to do so, but only one at a time.  Is there
a away to copy all files at one time so I dont have to name them
individually when copying all of them over?  Thanks.

Check out the below link hope to help !!

https://cisco.com/en/US/products/hw/routers/ps233/products_tech_note09186a00800a6744.shtml

Ganesh.H

Hi jjoseph01,

 

The best way is to tar all the files to your PC first, using the below command.

archive tar /create tftp://192.168.10.200/Flash_Files.tar flash:

Once all the files are copied to the tftp server,  it is easy to untar all the files to USB drive.

 

Imthiyas Khan

This worked well for me, at least for my use case, which was a path with only files in it.  Thank you.

Hi Mike,

I am glad to hear that your issue is resolved.

Please rate if it really helps you :)

Hi,

Is there any way to copy all the files at one time which are in the router to TFTP server , It is working for individual files but i have huge amount of files on the router

freyguy
Level 1
Level 1

This solution is version dependent, but this worked for me:

 

archive upload-sw usbflash0:/<filename.tar>   

 

...where <filename.tar> is the name of the tar file you want to be created on the USB drive. 

E.g. If you want the filename to be "original-software.tar"  then the command line would be:

 

           archive upload-sw usbflash0:/original-software.tar

 

FYI;

spiritJ_OBPtech
Level 1
Level 1

Plug in USB determine its name as the cli recognizes the insertion of the usb, usually appears as either usbflash0:  or usbflash1:   Note: usb name # variable of your usb drive denoted as "#" on instructions below:

cd usbflash"#":     (note: this command is not needed if you name the absolute path of your tar file.  e.g. "usbflash1:/yourtarfilename.tar"

archive tar /create yourtarfilename.tar flash:/

COMMAND SYNTAX:  archive tar /create your_tar_file_name.tar  drive_source_path:/directory/    
*note the spaces and the use of the colon after drivename and the slash after the directory path named

You can even use winrar, winzip, or 7zip to create a "*.tar" file place it in your USB (or maybe you copied an archive of another switch) then extract the archive files onto your flash: directory.

archive tar /xtract /usbflash"#":/directoryinUSB/anotherdirectory/arvhive.tar  flash:/c2960x-version-build123/  

COMMAND SYNTAX:  archive tar /xtract drive_source:/directory/tar_filename.tar  drive_destination:/folder/
*note the spaces and the use of the colon after drivename and the slash after the directory path named

To get command specifics put a ? after each word of each line to get the possible values of each syntax, e.g.   

archive tar ?   -shows the different options for manipulating tar files
archive ?     - shows different archive methods other than tar

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco