AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Invokes the RestoreDBInstanceToPointInTime operation against Amazon Relational Database Service.

Syntax

Restore-RDSDBInstanceToPointInTime
-SourceDBInstanceIdentifier <String>
-TargetDBInstanceIdentifier <String>
-AutoMinorVersionUpgrade <Boolean>
-AvailabilityZone <String>
-CopyTagsToSnapshot <Boolean>
-DBInstanceClass <String>
-DBName <String>
-DBSubnetGroupName <String>
-Domain <String>
-DomainIAMRoleName <String>
-EnableIAMDatabaseAuthentication <Boolean>
-Engine <String>
-Iops <Int32>
-LicenseModel <String>
-MultiAZ <Boolean>
-OptionGroupName <String>
-Port <Int32>
-PubliclyAccessible <Boolean>
-RestoreTime <DateTime>
-StorageType <String>
-Tag <Tag[]>
-TdeCredentialArn <String>
-TdeCredentialPassword <String>
-UseLatestRestorableTime <Boolean>
-Force <SwitchParameter>

Description

Restores a DB instance to an arbitrary point in time. You can restore to any point in time before the time identified by the LatestRestorableTime property. You can restore to a point up to the number of days specified by the BackupRetentionPeriod property. The target database is created with most of the original configuration, but in a system-selected availability zone, with the default security group, the default subnet group, and the default DB parameter group. By default, the new DB instance is created as a single-AZ deployment except when the instance is a SQL Server instance that has an option group that is associated with mirroring; in this case, the instance becomes a mirrored deployment and not a single-AZ deployment.

Parameters

-AutoMinorVersionUpgrade <Boolean>
Indicates that minor version upgrades will be applied automatically to the DB instance during the maintenance window.
Required?False
Position?Named
Accept pipeline input?False
-AvailabilityZone <String>
The EC2 Availability Zone that the database instance will be created in.Default: A random, system-chosen Availability Zone.Constraint: You cannot specify the AvailabilityZone parameter if the MultiAZ parameter is set to true.Example: us-east-1a
Required?False
Position?Named
Accept pipeline input?False
-CopyTagsToSnapshot <Boolean>
True to copy all tags from the restored DB instance to snapshots of the DB instance; otherwise false. The default is false.
Required?False
Position?Named
Accept pipeline input?False
-DBInstanceClass <String>
The compute and memory capacity of the Amazon RDS DB instance.Valid Values: db.t1.micro | db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.2xlarge | db.m2.4xlarge | db.m3.medium | db.m3.large | db.m3.xlarge | db.m3.2xlarge | db.m4.large | db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge | db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge | db.r3.4xlarge | db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium | db.t2.largeDefault: The same DBInstanceClass as the original DB instance.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-DBName <String>
The database name for the restored DB instance.This parameter is not used for the MySQL or MariaDB engines.
Required?False
Position?Named
Accept pipeline input?False
-DBSubnetGroupName <String>
The DB subnet group name to use for the new instance.Constraints: If supplied, must match the name of an existing DBSubnetGroup.Example: mySubnetgroup
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Domain <String>
Specify the Active Directory Domain to restore the instance in.
Required?False
Position?Named
Accept pipeline input?False
-DomainIAMRoleName <String>
Specify the name of the IAM role to be used when making API calls to the Directory Service.
Required?False
Position?Named
Accept pipeline input?False
-EnableIAMDatabaseAuthentication <Boolean>
True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts; otherwise false. You can enable IAM database authentication for the following database engines
  • For MySQL 5.6, minor version 5.6.34 or higher
  • For MySQL 5.7, minor version 5.7.16 or higher
  • Aurora 5.6 or higher.
Default: false
Required?False
Position?Named
Accept pipeline input?False
-Engine <String>
The database engine to use for the new instance.Default: The same as sourceConstraint: Must be compatible with the engine of the sourceValid Values:
  • aurora
  • mariadb
  • mysql
  • oracle-ee
  • oracle-se2
  • oracle-se1
  • oracle-se
  • postgres
  • sqlserver-ee
  • sqlserver-se
  • sqlserver-ex
  • sqlserver-web
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Force <SwitchParameter>
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?False
-Iops <Int32>
The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for the DB instance.Constraints: Must be an integer greater than 1000.SQL ServerSetting the IOPS value for the SQL Server database engine is not supported.
Required?False
Position?Named
Accept pipeline input?False
-LicenseModel <String>
License model information for the restored DB instance.Default: Same as source. Valid values: license-included | bring-your-own-license | general-public-license
Required?False
Position?Named
Accept pipeline input?False
-MultiAZ <Boolean>
Specifies if the DB instance is a Multi-AZ deployment.Constraint: You cannot specify the AvailabilityZone parameter if the MultiAZ parameter is set to true.
Required?False
Position?Named
Accept pipeline input?False
-OptionGroupName <String>
The name of the option group to be used for the restored DB instance.Permanent options, such as the TDE option for Oracle Advanced Security TDE, cannot be removed from an option group, and that option group cannot be removed from a DB instance once it is associated with a DB instance
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Port <Int32>
The port number on which the database accepts connections.Constraints: Value must be 1150-65535Default: The same port as the original DB instance.
Required?False
Position?Named
Accept pipeline input?False
-PubliclyAccessible <Boolean>
Specifies the accessibility options for the DB instance. A value of true specifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false specifies an internal instance with a DNS name that resolves to a private IP address.Default: The default behavior varies depending on whether a VPC has been requested or not. The following list shows the default behavior in each case.
  • Default VPC:true
  • VPC:false
If no DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be publicly accessible. If a specific DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be private.
Required?False
Position?Named
Accept pipeline input?False
-RestoreTime <DateTime>
The date and time to restore from.Valid Values: Value must be a time in Universal Coordinated Time (UTC) formatConstraints:
  • Must be before the latest restorable time for the DB instance
  • Cannot be specified if UseLatestRestorableTime parameter is true
Example: 2009-09-07T23:45:00Z
Required?False
Position?Named
Accept pipeline input?False
-SourceDBInstanceIdentifier <String>
The identifier of the source DB instance from which to restore.Constraints:
  • Must match the identifier of an existing DBInstance.
Required?False
Position?1
Accept pipeline input?True (ByValue, )
-StorageType <String>
Specifies the storage type to be associated with the DB instance. Valid values: standard | gp2 | io1 If you specify io1, you must also include a value for the Iops parameter. Default: io1 if the Iops parameter is specified; otherwise standard
Required?False
Position?Named
Accept pipeline input?False
-Tag <Tag[]>
Documentation for this parameter is not currently available; please refer to the service API documentation.
Required?False
Position?Named
Accept pipeline input?False
-TargetDBInstanceIdentifier <String>
The name of the new database instance to be created.Constraints:
  • Must contain from 1 to 63 letters, numbers, or hyphens
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
Required?False
Position?2
Accept pipeline input?False
-TdeCredentialArn <String>
The ARN from the Key Store with which to associate the instance for TDE encryption.
Required?False
Position?Named
Accept pipeline input?False
-TdeCredentialPassword <String>
The password for the given ARN from the Key Store in order to access the device.
Required?False
Position?Named
Accept pipeline input?False
-UseLatestRestorableTime <Boolean>
Specifies whether (true) or not (false) the DB instance is restored from the latest backup time. Default: falseConstraints: Cannot be specified if RestoreTime parameter is provided.
Required?False
Position?Named
Accept pipeline input?False

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required? False
Position? Named
Accept pipeline input? False
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required? False
Position? Named
Accept pipeline input? False
-ProfileLocation <String>

Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)

If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials. Note that the encrypted credential file is not supported on all platforms. It will be skipped when searching for profiles on Windows Nano Server, Mac, and Linux platforms.

If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.

As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.

Required? False
Position? Named
Accept pipeline input? False
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required? False
Position? Named
Accept pipeline input? False
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required? False
Position? Named
Accept pipeline input? False
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required? False
Position? Named
Accept pipeline input? False
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required? False
Position? Named
Accept pipeline input? False
-Region <String>
The system name of the AWS region in which the operation should be invoked. For example, us-east-1, eu-west-1 etc.
Required? False
Position? Named
Accept pipeline input? False
-EndpointUrl <String>

The endpoint to make the call against.

Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.

Required? False
Position? Named
Accept pipeline input? False

Inputs

You can pipe a String object to this cmdlet for the SourceDBInstanceIdentifier parameter.

Outputs

This cmdlet returns a DBInstance object. The service call response (type Amazon.RDS.Model.RestoreDBInstanceToPointInTimeResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z