RDS advanced commands instructions

Last Updated: Feb 16, 2017

Instance export function

For RDS products, Alibaba Cloud CLI supports exporting DB instances to files, which is an extended function of the tool. You can choose an instance ID to export the corresponding instance to a file. The exported file content is in the json format, which is convenient for you to view or use in programming. The exported file is also an import file template. You can personalize modifications according to the file, and then import the file to create multiple DB instances.

Command example:

  1. aliyuncli rds ExportDBInstance --DBInstanceId XXXXX --filename test
  • DBInstanceId: This is a required parameter, indicating the ID of the instance to be exported.

  • filename: This is a required parameter, indicating the file to which of the instances is to be exported. It can be an absolute path or a single filename. If it is a single filename, the default path ~/.alicloudcli/ will be chosen.

Instance import function

For RDS products, Alibaba Cloud CLI supports instance creation via file import to easily create multiple identical DB instances. You can create multiple identical instances simply by specifying a template file and calling a command.

Command example:

  1. aliyuncli rds ImportDBInstance --filename test --count 5

Parameters description:

  • filename: Template file, which can be a filename or an absolute path. If it is a single filename, the system will search the file under the ~/.alicloudcli/ path.

  • count: Indicates the number of DB instances to be created. This value of this parameter is a number. If this number exceeds the maximal value of instances that can be created at one time, a DB instance will be created by default. We strongly recommend that you use the file exported with the alicloudcli rds ExportDBInstance command as a template to edit. Do not create separate templates to avoid mistakes.

    Note: For details on the numbers of instances that can be created at one time, see the relevant documents of each product.

Special notice:

Currently DB instances created through RDS open APIs can only be charged on the Pay-As-You-Go basis. Therefore, your template file will be created as Pay-As-You-Go instances.

Thank you! We've received your feedback.