archive

Manages file archive operations

Supported on the following devices:

Syntax

archive tar /table [<FILE>|<URL>]
archive tar /create [<FILE>|<URL>] <FILE>
archive tar /xtract [<FILE>|<URL>] <DIR>

Parameters

archive tar /table [<FILE>|<URL>]

tar

Manipulates (creates, lists, or extracts) a tar file

/table

Lists the files in a tar file

<FILE>

Defines a tar filename

<URL>

Sets the tar file URL

archive tar /create [<FILE>|<URL>] <FILE>

tar

Manipulates (creates, lists or extracts) a tar file

/create

Creates a tar file

<FILE>

Defines tar filename

<URL>

Sets the tar file URL

archive tar /xtract [<FILE>|<URL>] <DIR>

tar

Manipulates (creates, lists or extracts) a tar file

/xtract

Extracts content from a tar file

<FILE>

Defines tar filename

<URL>

Sets the tar file URL

<DIR>

Specify a directory name. When used with /create, dir is the source directory for the tar file. When used with /xtract, dir is the destination file where contents of the tar file are extracted.

Examples

Following examples show how to zip the folder flash:/log/?

nx9500-6C8809#dir flash:/
Directory of flash:/

 -rw-   62937      Tue Nov 24 16:00:06 2015   run-config-backup.txt
  drwx             Mon Apr  3 12:40:23 2017   crashinfo
  drwx             Wed Mar 22 13:58:28 2017   upgrade
  drwx             Mon Sep 28 09:48:33 2015   tmptpd
  drwx             Wed Apr  5 11:20:11 2017   log
  drwx             Thu Mar 30 15:07:54 2017   archived_logs
  drwx             Tue May 24 22:23:54 2016   cache
  drwx             Thu Feb 19 08:53:45 2015   floorplans
  -rw-   42018304  Tue Sep 27 10:19:24 2016   in.tar
  drwx             Tue Jan 17 10:02:01 2017   hotspot

nx9500-6C8809#
nx9500-6C8809#archive tar /create flash:/in.tar flash:/log/
log/nsightd.log.1
log/nsight_reportd.log
log/messages.1.log
log/martdb.log
log/reportd.log.2
log/adopts.log.2
log/mongod.log.2
log/dpd2.log
log/nsight_server.log
log/mart_websock_server.log
log/nuxi/
log/nuxi/beanyaml.log
log/nuxi/statsreqresp.1.log
log/nuxi/hadoop.log.2014-08-03
log/nuxi/puts.log
log/nuxi/copy2w.log
log/nuxi/obj2yaml.log
log/nuxi/infl.log
--More--
nx9500-6C8809#
nx9500-6C8809#dir flash:/
Directory of flash:/

  -rw-   62937     Tue Nov 24 16:00:06 2015   run-config-backup.txt
  drwx             Thu Sep 22 00:12:07 2016   crashinfo
  drwx             Sat Sep 17 05:14:43 2016   upgrade
  drwx             Mon Sep 28 09:48:33 2015   tmptpd
  drwx             Tue Sep 27 09:59:12 2016   log
  drwx             Mon Sep 26 09:58:54 2016   archived_logs
  drwx             Tue May 24 22:23:54 2016   cache
  drwx             Thu Feb 19 08:53:45 2015   floorplans
  -rw-   42018304  Tue Sep 27 10:19:24 2016   in.tar
  drwx             Mon Sep 15 03:40:02 2014   hotspot

nx9500-6C8809#