< Back

Add-GceSnapshot

Mon Jan 13, 2020 11:01 pm

NAME Add-GceSnapshot



SYNOPSIS

Creates a new disk snapshot.





SYNTAX

Add-GceSnapshot [-Disk] <Disk> [-Label <Hashtable>] [-Name <string>] [-Description <string>] [-GuestFlush

<SwitchParameter>] [<CommonParameters>]



Add-GceSnapshot [-Project <string>] [-Zone <string>] [-Label <Hashtable>] [-DiskName] <string> [-Name <string>]

[-Description <string>] [-GuestFlush <SwitchParameter>] [<CommonParameters>]





DESCRIPTION

Creates a new disk snapshot to backup the data of the disk.





PARAMETERS

-Disk <Disk>

The disk object to create the snapshot from.



Required? true

Position? 0

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Project <string>

The project of the disk. Defaults to the gcloud config project.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Zone <string>

The zone the disk is in. Defaults to the gloud config zone.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Label <Hashtable>

The map of labels (key/value pairs) to be applied to the snapshot.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DiskName <string>

The name of the disk to get a snapshot of.



Required? true

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Name <string>

The name of the snapshot. Defaults to <DiskName>-<Timestamp>



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Description <string>

Human readable description of the snapshot.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-GuestFlush <SwitchParameter>

If set, the snapshot created will be a Windows Volume Shadow Copy Service (VSS) snapshot. See:

https://cloud.google.com/compute/docs/i ... t?hl=en_US for

more details.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-VSS <SwitchParameter>

If set, the snapshot created will be a Windows Volume Shadow Copy Service (VSS) snapshot. See:

https://cloud.google.com/compute/docs/i ... t?hl=en_US for

more details.



This is an alias of the GuestFlush parameter.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Google.Apis.Compute.v1.Data.Disk

The disk object to create the snapshot from.





OUTPUTS

Google.Apis.Compute.v1.Data.Snapshot





---------- EXAMPLE 1 ----------



PS C:\\> Add-GceSnapshot "my-disk" -Name "my-snapshot"



Creates a new disk snapshot from the disk named "my-disk" in the default project and zone. The name of the

snapshot will be "my-snapshot".

---------- EXAMPLE 2 ----------



PS C:\\> Get-GceDisk "my-disk" | Add-GceSnapshot



Creates a new disk snapshot from the disk named "my-disk". The name of the snapshot will start with "my-disk" and

end with the utc date and time the snapshot was taken.



RELATED LINKS

[Snapshot resource definition] (https://cloud.google.com/compute/docs/r ... s#resource)