You can export security group rules to JSON or CSV files for on-premises backup.

Procedure

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Network & Security > Security Groups.
  3. In the top navigation bar, select a region.
  4. On the Security Groups page, find the security group for which you want to export security group rules and click Add Rules in the Actions column.
  5. In the Access Rule section, click Export, select a file format, and then save the file to your computer.
    • JSON Format

      A JSON file must follow the following naming convention: ecs_${regionID}_${groupID}.json.

      If regionID is set to cn-qingdao and groupID is set to sg-123, the name of the exported JSON file is ecs_cn-qingdao_sg-123.json.

    • CSV Format

      A CSV file must follow the following naming convention: ecs_sgRule_${groupID}_${regionID}_${time}.csv.

      If regionID is set to cn-qingdao, groupID is set to sg-123, and time is set to 2020-01-20, the name of the exported CSV file is ecs_sgRule_sg-123_cn-qingdao_2020-01-20.csv.