-->![Archive Name And Parameters Cider Archive Name And Parameters Cider](http://lamberts-stamford.co.uk/wp-content/uploads/2016/11/img_0206.jpg)
Creates a compressed archive, or zipped file, from specified files and directories.
Syntax
Archive name and parameters dialog: advanced options. Save file security data. This option has meaning only for NTFS file system and allows to save file owner, group, access control and audit information. You need to have necessary privileges in order to use this facility. Processing of security data may decrease the speed of archiving. Archive Name And Parameters Java. 5/31/2017 0 Comments Named Parameters in Java 8: Adam Bien's Weblog. With Java 8 and the compiler flag: javac - parameters method parameter names are available via reflection. Module, and Component Names. This includes the archive names and the display names in the deployment descriptors for a J2.
Description
The
Compress-Archive
cmdlet creates a compressed, or zipped, archive file from one or morespecified files or directories. An archive packages multiple files, with optional compression, intoa single zipped file for easier distribution and storage. An archive file can be compressed by usingthe compression algorithm specified by the CompressionLevel parameter.The
Compress-Archive
cmdlet uses the Microsoft .NET APISystem.IO.Compression.ZipArchive to compress files.The maximum file size is 2 GB because there's a limitation of the underlying API.Some examples use splatting to reduce the line length of the code samples. For more information, seeabout_Splatting.
Examples
Example 1: Compress files to create an archive file
This example compresses files from different directories and creates an archive file. A wildcard isused to get all files with a particular file extension. There's no directory structure in thearchive file because the Path only specifies file names.
The Path parameter accepts specific file names and file names with wildcards,
*.vsd
. ThePath uses a comma-separated list to get files from different directories. The compression levelis Fastest to reduce processing time. The DestinationPath parameter specifies the locationfor the Draft.zip
file. The Draft.zip
file contains Draftdoc.docx
and all the files with a.vsd
extension.Example 2: Compress files using a LiteralPath
This example compresses specific named files and creates a new archive file. There's no directorystructure in the archive file because the Path only specifies file names.
Absolute path and file names are used because the LiteralPath parameter doesn't acceptwildcards. The Path uses a comma-separated list to get files from different directories. Thecompression level is Fastest to reduce processing time. The DestinationPath parameterspecifies the location for the
Draft.zip
file. The Draft.zip
file only contains Draftdoc.docx
and diagram2.vsd
.Example 3: Compress a directory that includes the root directory
This example compresses a directory and creates an archive file that includes the rootdirectory, and all its files and subdirectories. The archive file has a directory structure becausethe Path specifies a root directory.
Compress-Archive
uses the Path parameter to specify the root directory, C:Reference
. TheDestinationPath parameter specifies the location for the archive file. The Draft.zip
archiveincludes the Reference
root directory, and all its files and subdirectories.Example 4: Compress a directory that excludes the root directory
This example compresses a directory and creates an archive file that excludes the root directorybecause the Path uses an asterisk (
*
) wildcard. The archive contains a directory structurethat contains the root directory's files and subdirectories.Compress-Archive
uses the Path parameter to specify the root directory, C:Reference
with anasterisk (*
) wildcard. The DestinationPath parameter specifies the location for the archivefile. The Draft.zip
archive contains the root directory's files and subdirectories. TheReference
root directory is excluded from the archive.Example 5: Compress only the files in a root directory
This example compresses only the files in a root directory and creates an archive file. There's nodirectory structure in the archive because only files are compressed.
Compress-Archive
uses the Path parameter to specify the root directory, C:Reference
with astar-dot-star (*.*
) wildcard. The DestinationPath parameter specifies the location for thearchive file. The Draft.zip
archive only contains the Reference
root directory's files and theroot directory is excluded.Example 6: Use the pipeline to archive files
This example sends files down the pipeline to create an archive. There's no directory structure inthe archive file because the Path only specifies file names.
Get-ChildItem
uses the Path parameter to specify two files from different directories. Eachfile is represented by a FileInfo object and is sent down the pipeline to Compress-Archive
.The two specified files are archived in PipelineFiles.zip
.Example 7: Use the pipeline to archive a directory
This example sends a directory down the pipeline to create an archive. Files are sent asFileInfo objects and directories as DirectoryInfo objects. The archive's directory structuredoesn't include the root directory, but its files and subdirectories are included in the archive.
Get-ChildItem
uses the Path parameter to specify the C:LogFiles
root directory. EachFileInfo and DirectoryInfo object is sent down the pipeline.Compress-Archive
adds each object to the PipelineDir.zip
archive. The Path parameter isn'tspecified because the pipeline objects are received into parameter position 0.Example 8: How recursion can affect archives
This example shows how recursion can duplicate files in your archive. For example, if you use
Get-ChildItem
with the Recurse parameter. As recursion processes, each FileInfo andDirectoryInfo object is sent down the pipeline and added to the archive.The
C:TestLog
directory doesn't contain any files. It does contain a subdirectory named testsub
that contains the testlog.txt
file.Get-ChildItem
uses the Path parameter to specify the root directory, C:TestLog
. TheRecurse parameter processes the files and directories. A DirectoryInfo object is created fortestsub
and a FileInfo object testlog.txt
.Each object is sent down the pipeline to
Compress-Archive
. The DestinationPath specifies thelocation for the archive file. The Path parameter isn't specified because the pipeline objectsare received into parameter position 0.The following summary describes the
PipelineRecurse.zip
archive's contents that contains aduplicate file:- The DirectoryInfo object creates the
testsub
directory and contains thetestlog.txt
file,which reflects the original directory structure. - The FileInfo object creates a duplicate
testlog.txt
in the archive's root. The duplicatefile is created because recursion sent a file object toCompress-Archive
. This behavior isexpected because each object sent down the pipeline is added to the archive.
Example 9: Update an existing archive file
This example updates an existing archive file,
Draft.Zip
, in the C:Archives
directory. In thisexample, the existing archive file contains the root directory, and its files and subdirectories.The command updates
Draft.Zip
with newer versions of existing files in the C:Reference
directory and its subdirectories. And, new files that were added to C:Reference
or itssubdirectories are included in the updated Draft.Zip
archive.Parameters
Specifies how much compression to apply when you're creating the archive file. Faster compressionrequires less time to create the file, but can result in larger file sizes.
If this parameter isn't specified, the command uses the default value, Optimal.
The following are the acceptable values for this parameter:
![Archive Name And Parameters Cider Archive Name And Parameters Cider](http://lamberts-stamford.co.uk/wp-content/uploads/2016/11/img_0206.jpg)
- Fastest. Use the fastest compression method available to reduce processing time. Fastercompression can result in larger file sizes.
- NoCompression. Doesn't compress the source files.
- Optimal. Processing time is dependent on file size.
Type: | String |
Accepted values: | Optimal, NoCompression, Fastest |
Position: | Named |
Default value: | Optimal |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
This parameter is required and specifies the path to the archive output file. TheDestinationPath should include the name of the zipped file, and either the absolute or relativepath to the zipped file.
If the file name in DestinationPath doesn't have a
.zip
file name extension, the cmdlet addsthe .zip
file name extension.Type: | String |
Position: | 1 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Forces the command to run without asking for user confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the path or paths to the files that you want to add to the archive zipped file. Unlike thePath parameter, the value of LiteralPath is used exactly as it's typed. No characters areinterpreted as wildcards. If the path includes escape characters, enclose each escape character insingle quotation marks, to instruct PowerShell not to interpret any characters as escape sequences.To specify multiple paths, and include files in multiple locations in your output zipped file, usecommas to separate the paths.
Type: | String[] |
Aliases: | PSPath |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Causes the cmdlet to output a file object representing the archive file created.
This parameter was introduced in PowerShell 6.0.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the path or paths to the files that you want to add to the archive zipped file. To specifymultiple paths, and include files in multiple locations, use commas to separate the paths.
This parameter accepts wildcard characters. Wildcard characters allow you to add all files in adirectory to your archive file.
Using wildcards with a root directory affects the archive's contents:
- To create an archive that includes the root directory, and all its files and subdirectories,specify the root directory in the Path without wildcards. For example:
-Path C:Reference
- To create an archive that excludes the root directory, but zips all its files andsubdirectories, use the asterisk (
*
) wildcard. For example:-Path C:Reference*
- To create an archive that only zips the files in the root directory, use the star-dot-star(
*.*
) wildcard. Subdirectories of the root aren't included in the archive. For example:-Path C:Reference*.*
Type: | String[] |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName, ByValue) |
Accept wildcard characters: | True |
Updates the specified archive by replacing older file versions in the archive with newer fileversions that have the same names. You can also add this parameter to add files to an existingarchive.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet isn't run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
System.String
You can pipe a string that contains a path to one or more files.
Outputs
System.IO.FileInfo
The cmdlet only returns a FileInfo object when you use the PassThru parameter.
Notes
Using recursion and sending objects down the pipeline can duplicate files in your archive. Forexample, if you use
Get-ChildItem
with the Recurse parameter, each FileInfo andDirectoryInfo object that's sent down the pipeline is added to the archive.Related Links
Installing Cinder
The Cinder configuration must specify at least the following information:
- Authorization information to authenticate with Keystone.
- The class of volumes to be created.
How to Install and Configure Cinder
- Install the Cinder package.
- Specify authentication configuration information.Uncomment and set the following parameters in the /etc/cinder/api-paste.ini file. These parameters specify the location of the Keystone API service and the Cinder authentication information.
- Specify the classes of volumes that the Cinder volume service should create.In the /etc/cinder/cinder.conf file, uncomment the appropriate volume_driver parameter. The following four classes of volumes are supported:
- ZFSVolumeDriver
- Supports creation of local volumes for use by Nova on the same node as the Cinder volume service.
- ZFSISCSIDriver
- Supports creation and export of iSCSI targets for use by remote Nova compute nodes.
- ZFSFCDriver
- Supports creation and export of Fibre Channel LUNs for use by remote Nova compute nodes.
- ZFSSAISCSIDriver
- Supports creation and export of iSCSI targets from a remote Oracle ZFS Storage Appliance for use by remote Nova compute nodes. Additional parameters for this driver must be set in the /etc/cinder/cinder.conf file.
In the example described in this chapter, iSCSI is used to provide volumes for use by Nova instances. Comment out the default selection of ZFSVolumeDriver, and uncomment the ZFSISCSIDriver selection. - Set additional configuration parameters.Uncomment and set the following parameters in the /etc/cinder/cinder.conf file. These parameters specify the location of the Glance API service, the corresponding database for Cinder, and the RabbitMQ service.
- If iSCSI targets will be configured, enable the corresponding SMF services.
- Enable the Cinder SMF services.
See also
See also How to Build OpenStack Block Storage on ZFS.
How to Configure the ZFS Storage Appliance iSCSI Cinder Driver
The Oracle ZFS Storage Appliance iSCSI Cinder driver enables the Oracle ZFS Storage Appliance (ZFSSA) to be used seamlessly as a block storage resource for Cinder. The driver provides the ability to create iSCSI volumes that can be allocated by a Cinder server to any virtual machine instantiated by the Nova service. The driver is delivered by the cloud/openstack/cinder package. Your appliance must be running at least ZFSSA software release 2013.1.2.0.
Before You Begin
Configure a pool on the Oracle ZFS Storage Appliance. You can choose to use a preexisting pool.
- Run the workflow cinder.akwf.You can either use an existing user or create a new user with role authorizations for performing Cinder driver operations.The cinder.akwf workflow performs the following tasks:
- Creates the user if the user does not exist.
- Sets role authorizations for performing Cinder driver operations.
- Enables the RESTful service if the service is currently disabled.
You can run the workflow from the Command Line Interface (CLI) or from the Browser User Interface (BUI) of your appliance.- Run the workflow from the CLI.
- Run the workflow from the BUI.
- Select Maintenance → Workflows, and use the plus icon to upload a new workflow.
- Click the Browse button, and select the cinder.akwf file.
- Click the UPLOAD button to finish uploading the workflow.
- Click on the new row that appears on the BUI Workflows page to run the Cinder driver workflow.The workflow prompts for a user name and password. This user name and password will also be used in the cinder.conf file as zfssa_auth_user and zfssa_auth_password.
- Set parameters in the cinder.conf file.Specify the following required properties in the cinder.conf file:
- volume_driver – Make sure cinder.volume.drivers.zfssa.zfssaiscsi.ZFSSAISCSIDriver is uncommented. Make sure the other three selections are commented out.
- zfssa_host – The name or IP address of the ZFSSA management host.
- zfssa_auth_user – The user name of the Cinder user on the ZFSSA.
- zfssa_auth_password – The password of the Cinder user on the ZFSSA.
- zfssa_pool – The pool to be used to allocate volumes.
- zfssa_target_portal – The ZFSSA iSCSI target portal (data-ip:port). The default port is 3260.
- zfssa_project – The name of the ZFSSA project. If the project does not exist on the appliance, a project with that name is created by the driver at startup time. This project contains all the volumes created by the driver. Additional ZFSSA properties are provided for setting up volume characteristics (for example, block size) and access (for example, initiators, targets, security).
- zfssa_initiator_group – The name of the initiator group. If the initiator group does not exist on the appliance, an initiator group with that name is created by the driver at startup time. If you want to use the default initiator group, set the value of this parameter to default. The default initiator group can be useful for evaluation purposes. The default initiator group should not normally be used because it can result in exposure of the volumes to unwanted or conflicting initiators.
- zfssa_target_interfaces – The ZFSSA iSCSI target network interfaces. Use the following command to see the interfaces:
- connection – Change connection to sql_connection.Locate the following line:Modify this line as shown below:
- Ensure the ZFSSA iSCSI service is online.If the ZFSSA iSCSI service is not online, use either the BUI or the CLI in the appliance to enable it. The following example shows using the CLI in the appliance:
- Enable the Cinder volume SMF services.