Index your archives to use with Serve from Zip

To use the Serve from Zip feature, the archive needs an index applied to create a hash table of its contents. The hash table is then added to the “.zip” archive as a comment.

CAUTION: You should enable Serve from Zip for your storage group or the indexed zip files will become corrupt and unusable.

Indexing an archive requires that the filename use a “.zip” extension. You can add an index using any of these methods:

Index method Description
Auto-indexing Automatic indexing is available for Aspera, Rsync, SCP, SFTP, and FTP protocols. Apply these steps to enable auto-indexing on your upload account:
  1. Access the Upload Accounts entity from the NetStorage UI in Control Center.
  2. Edit the upload account you want to apply auto-indexing.
  3. Navigate to the Advanced Settings section of the upload account.
  4. Select Append serve-from-zip index from the On Zip File Upload section.
Note: Auto-index will always index zip files for that upload account. This limits the use of Rsync or Aspera sync to upload only, as auto-indexing will change MD5 signatures and sizes that prevent the use of synchronization features. Auto-indexing doesn’t apply to File Manager or the HTTP Usage API.
FTP Apply a zip index with FTP by performing these steps:
  1. Establish an FTP connection to the applicable NetStorage storage group.
  2. Issue the site az2z command from the FTP terminal.
  3. Upload the file as necessary. (Use any other applicable FTP commands).
Important:
  • The site az2z command needs to be re-entered prior to each archive file upload, and the subsequent upload must be initiated from the same FTP session.
  • Additionally, an error will be generated if the file uploaded is NOT an archive file.
  • FTP is an insecure protocol. Some GUI FTP clients don't support site commands.
CMShell Apply a zip index with CMShell by performing these steps:
  1. Upload the archive file(s) to NetStorage using whatever means you prefer. (This can be any of the protocols covered in this document or even via the FileManager 2.0 tool available in Control Center.)
  2. Make note of the complete path to all uploaded archive files.
  3. Access CMShell.
  4. Run the az2z <archive_file> command for each archive.
CAUTION:
  • If you unzip an indexed archive file with a tool that displays comments (for example, the unzip command available for use with CMShell), the table hash is listed among the archive’s contents, appearing as garbled text.
  • Using CMShell adds an extra step that reads and writes the whole file instead of adding just the index while uploading.
NetStorage Usage API

Use the API's upload action with the index-zip=1 option to enable az2z processing. This will index an uploaded “.zip” archive for the “Serve from Zip” feature. The API allows full control over whether of not to index zip files without having to switch upload accounts.

Additional details on the use of the upload action can be found in the NetStorage Usage API.