Navigation

Edit an Archiving Rule

You can modify the number of days to keep data on the Atlas cluster (the Age Limit) or the custom JSON query used to select documents for archiving from the Atlas UI and API .

To edit an online archive, in your Atlas UI:

1
  1. If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.
  2. If it is not already displayed, select your desired project from the Projects menu in the navigation bar.
  3. If the Clusters page is not already displayed, click Clusters in the sidebar.
2
  1. Click the name of the cluster.
  2. Click the Online Archive tab to view the list of online archives, if any, for the cluster.
3

You can:

  • Pause Archive (only if state is Active)
  • Edit Archiving Rule
  • Delete Archive
  • Resume Archive (only if state is Paused)
4
  • If you are modifying a criteria based on a combination of a date and number of days to store the data on the Atlas cluster:

    1. Select Edit Age Limit.
    2. Modify the number of days Atlas must store data on the active Atlas cluster in the Enter a new age limit field.
    3. Click Save for the changes to take effect.
  • If you are modifying a custom query for selecting documents to archive:

    1. Select Edit Custom Query.
    2. Enter the JSON query to run to select documents for archiving. Atlas uses the specified query with the db.collection.find(query) command. The empty document {} to return all documents is not supported.
    3. Click Save for the changes to take effect.

You cannot modify the partition fields or structure from the Atlas UI or API . However, you can manually migrate the data from the cloud object storage using mongodump, delete the online archive, use mongorestore to restore the data on the Atlas cluster, and then create a new online archive for the collection with the desired partition fields and/or structure.

To edit an online archive through the API , send a PATCH request to the onlineArchives endpoint with the unique ID of the online archive to update. To learn more about the API syntax and options, see Update an Online Archive.

Give Feedback