Point-in-time key-values

Azure App Configuration maintains a record of changes made to key-values. This record provides a timeline of key-value changes. You can reconstruct the history of any key and provide its past value at any moment within the key history period (7 days for Free tier stores, or 30 days for Standard tier stores). Using this feature, you can “time-travel” backward and retrieve an old key-value. For example, you can recover configuration settings used before the most recent deployment in order to roll back the application to the previous configuration.

Restore key-values

You can use the Azure portal or the Azure CLI to retrieve past key-values.

  1. Sign in to the Azure portal. Select All resources, and select the App Configuration store instance where your key-value are stored.

  2. In the Operations menu, select Restore.

    Screenshot of the Azure portal, selecting restore

  3. Select Date: Select date to select a date and time you want to revert to.

  4. Click outside of the date and time fields or press Tab to validate your choice. You can now see which key-values have changed between your selected date and time and the current time. This step helps you understand what keys and values you're preparing to revert to.

    Screenshot of the Azure portal with saved key-values

    The portal displays a table of key-values. The first column includes symbols indicating what will happen if you restore the data for the chosen date and time:

    • The red minus sign (–) means that the key-value didn't exist at your selected date and time and will be deleted.
    • The green plus sign (+) means that the key-value existed at your selected date and time and doesn't exist now. If you revert to selected date and time it will be added back to your configuration.
    • The orange bullet sign (•) means that the key-value was modified since your selected date and time. The key will revert to the value it had at the selected date and time.
  5. Select the checkbox in the row to select/deselect the key value to take action. When selected it will display the difference for the key value between the current and selected date and time.

    Screenshot of the Azure portal with compared keys-values

    In the above example, the preview shows the key TestApp:Settings:BackgroundColor, which currently has a value of #FFF. This value will be modified to #45288E if we go through with restoring the data.

    You can select one or more checkboxes in the table to take action on the key-value of your choice. You can also use the select-all checkbox at the very top of the list to select/deselect all key-values.

  6. Select Restore to restore the selected key-value(s) to the selected data and time.

    Screenshot of the Azure portal selecting Restore

Historical/Timeline view of key-value

Tip

This method is convenient if you have no more than a couple of changes to make, as Configuration explorer only lets you make changes key by key. If you need to restore multiple key-values at once, use the Restore menu instead.

You can also access the revision history of a specific key-value in the portal.

  1. In the Operations menu, select Configuration explorer.

  2. Select More actions for the key you want to explore, and then History

    Screenshot of the Azure portal selecting key-value history

    You can now see the revision history for the selected key and information about the changes.

  3. Select Restore to restore the key and value to this point in time.

    Screenshot of the Azure portal viewing key-value data for a specific date

Next steps