# Versioning

### Overview

Brainboard provides a native versioning mechanism that allows you to **keep track** of your changes and **rollback/restore** any specific point-in-time version.

*This article lists the information that is saved for each version in Brainboard, in addition to steps for creating a new version, viewing already saved versions and restoring an existing version.*&#x20;

***

### Components of a version

When you create a version, Brainboard saves the following information:

✅ The architecture design.

✅ The version of the cloud provider selected to create the architecture.

✅ Variables.

✅ Output.

✅ The README file.

✅ The structure of the Terraform files.

✅ Timestamp in UTC when the version is created.

✅The person who created the version.

✅ The commit message.

{% hint style="info" %}
The Terraform code is automatically generated, and it is not saved as code.
{% endhint %}

***

### How to create a version?

To create a version of your architecture, you can follow these steps:&#x20;

1. Click on the version history icon in the top navigation bar. The <mark style="color:$primary;">**Version history**</mark> will open in the right pane.&#x20;
2. Click the <mark style="color:$primary;">**`New version`**</mark> button on the <mark style="color:$primary;">**Version history**</mark> pane.&#x20;

<figure><img src="/files/Ex6It7TTxcMvFv8anlZP" alt=""><figcaption></figcaption></figure>

3. On the **Create new version** popup modal, you can enter the description of the version and click <mark style="color:$primary;">**`Create`**</mark> to save.&#x20;

{% hint style="info" %}
The version description could be the same commit message you would write when performing a **pull request**.  You can write multiline text if you want to provide more details.
{% endhint %}

<figure><img src="/files/bCcIUQox1u2bfmQVpqdg" alt=""><figcaption></figcaption></figure>

4. When a version is created and saved, it's listed on the <mark style="color:$primary;">**Version history**</mark> pane on the right side.&#x20;

{% hint style="success" %}
Each new version that's created also displays the **name of the user** who created along with the **time/date** it was created.
{% endhint %}

<figure><img src="/files/zXtptgOiIGuWCkJ21CAn" alt=""><figcaption></figcaption></figure>

***

### View available versions

If you want to view the list of available versions of your architecture design, click on the **version history icon** in the top navigation bar. The **Version history** pane will expand on the right side of the screen.&#x20;

{% hint style="info" %}
The versions are listed in order of **latest/newest** to **oldest.**&#x20;
{% endhint %}

<figure><img src="/files/6EMU7vXkSTJNiexsnKkY" alt=""><figcaption></figcaption></figure>

***

### How to restore a version?

To restore any version, click on the **version history icon** in the top navigation bar. On the **Version history** pane on the right side, click on the **version** you want to restore.  The clicked version will be restored, and the following success message will be displayed at the bottom of the **Version history** pane.

*<mark style="color:green;">Architecture version restored successfully.</mark>*&#x20;

<figure><img src="/files/0BQ9zGYaLH8Jqlhj5J67" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**IMPORTANT**

* Brainboard versions are immutable snapshots of your infrastructure. You cannot delete them.
* You can check out any version and work on it without altering the history of the versioning.
* When you clone an architecture or create a template from it, its versions will be removed.
* When you checkout a version, both the diagram and the Terraform code will be updated.
  {% endhint %}

***

### Push to git

Please refer to the [<mark style="color:$primary;">**`Pull requests`**</mark>](/cloud-design/autogenerated-code/pull-requests.md) page for detailed information on how to do pull requests and save the generated code into git.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.brainboard.co/cloud-design/design-area/versioning.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
