Moving a Log Group Between Compartments

Move a log group to a different compartment.

  • When you move a log group to a new compartment, all the logs in the log group move with the log group to the new compartment. After you move the log group to the new compartment, the policies in the new compartment apply immediately, and they affect access to the log group and any logs the log group contains.

    For more information, see Moving Resources to a Different Compartment.


    You can't move, edit, or delete the default log group.
    1. Open the navigation menu and click Observability & Management. Under Logging, click Log Groups.
    2. Under List scope, select the compartment that contains the log group that you want to move.
    3. On the Log Groups page, click the name of the log group.
    4. On the log group details page, click Move Resource.
    5. In the Move resource dialog box, select the new compartment.
    6. Click Move resource.
  • Use the oci logging log-group change-compartment command and required parameters to move a log group between compartments:

    oci logging log-group change-compartment --log-group-id log_group_ocid [OPTIONS]

    For a complete list of parameters and variable options for CLI commands, see the Command Line Reference.

  • Run the ChangeLogGroupCompartment operation to move a log group between compartments.