Replicates resources from a source Logstore to a destination Logstore.

You can run the copy_logstore command to replicate the following Log Service resources from a Logstore to another Logstore:
  • Logstores
  • Indexes
  • Logtail configurations

Request syntax

aliyunlog log copy_logstore --from_project=<value> --from_logstore=<value> --to_logstore=<value> [--to_project=<value>] [--to_client=<value>] [--to_region_endpoint=<value>] [--access-id=<value>] [--access-key=<value>] [--sts-token=<value>] [--region-endpoint=<value>] [--client-name=<value>] [--jmes-filter=<value>] [--format-output=<value>] [--decode-output=<value>]

Request parameters

The following table describes the required and specific parameters of the copy_logstore command.
Parameter Type Required Example Description
--from_project String Yes project-a The name of the source project.
--from_logstore String Yes logstore-a The name of the source Logstore.
--to_logstore String Yes logstore-b The name of the destination Logstore.
--to_project String Yes project-b The name of the destination project.
--to_client String No test The account to which the destination project belongs. For information about how to configure an account, see Configure the Log Service CLI.
For information about the global parameters of the Log Service command-line interface (CLI), see Global variables.

Examples

  • Sample requests
    Replicate the resources in logstore-a to logstore-b. logstore-a belongs to the default account and logstore-b belongs to an account named test.
    aliyunlog log copy_logstore --from_project="project-a" --from_logstore="logstore-a" --to_logstore="logstore-b" --to_project="project-b " --to_client="test"
  • Sample responses

    After you run the command, no responses are returned.