All Products
Search
Document Center

What is the log deletion policy of an ApsaraDB for MongoDB instance?

Last Updated: Sep 24, 2020

Overview

This topic describes the log clearance policy in apsaradb for MongoDB.

Description

Alibaba Cloud reminds you that:

  • Before you perform operations that may cause risks, such as modifying instance configurations or data, we recommend that you check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.
  • You can modify the configurations and data of instances including but not limited to Elastic Compute Service (ECS) and Relational Database Service (RDS) instances. Before the modification, we recommend that you create snapshots or enable RDS log backup.
  • If you have authorized or submitted sensitive information such as the logon account and password in the Alibaba Cloud Management Console, we recommend that you modify such information in a timely manner.

When the log consumption disk space is too high, the automatic clearance policy is triggered. Can be used in case of emergency db.runCommand({compact:'oplog.rs'}) to clear oplog logs. For more information about the usage and precautions, see sort database fragments to improve disk usage.

Note:

  • You can only run this command on replica set instances.
  • Before running compact, you must log on to the local database where the oplog.rs collection is stored.
  • Prohibit Use db.repairDatabase command.

Application scope

  • Metrics for ApsaraDB for MongoDB