# My development layout is back to an old version, how can I restore a previous version?

**URL:** <https://community.forestadmin.com/t/my-development-layout-is-back-to-an-old-version-how-can-i-restore-a-previous-version/3552>\
**Category:** Help me!\
**Created:** [October 15, 2021, 1:22pm UTC](https://community.forestadmin.com/t/my-development-layout-is-back-to-an-old-version-how-can-i-restore-a-previous-version/3552 "2021-10-15T13:22:52Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![louisremi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/louisremi/32/165_2.png) [@louisremi](https://community.forestadmin.com/u/louisremi)\
**Post date:** [October 15, 2021, 1:22pm UTC](https://community.forestadmin.com/t/my-development-layout-is-back-to-an-old-version-how-can-i-restore-a-previous-version/3552/1 "2021-10-15T13:22:52Z")

</div>

I just deployed the layout of my development environment on one of my remote environments, and after restarting my local server, I realize that my layout on my development environment has reverted to a very old version, for some reason. How can I revert this layout to a previous version?

(some times ago, it was possible to deploy the layout of any environment to any other environment through the app, nowadays it seems everything is done through the CLI, which prevents deploying the layout of a remote environment to my local environment ☹ )

Thanks in advance

---

<div class="post-metadata">

**Author:** ![louisremi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/louisremi/32/165_2.png) [@louisremi](https://community.forestadmin.com/u/louisremi)\
**Post date:** [October 15, 2021, 1:28pm UTC](https://community.forestadmin.com/t/my-development-layout-is-back-to-an-old-version-how-can-i-restore-a-previous-version/3552/2 "2021-10-15T13:28:12Z")

</div>

The solution seems to be to push my layout changes to production before switching to a new branch, according to [How to bring in layout changes from staging to local](https://community.forestadmin.com/t/how-to-bring-in-layout-changes-from-staging-to-local/3079)

Why did this became so complex? Why isn’t this explained in the error message of the cli when I try to push a remote layout to local environment? There’s room for improvement here…

---

<div class="post-metadata">

**Author:** ![louisremi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/louisremi/32/165_2.png) [@louisremi](https://community.forestadmin.com/u/louisremi)\
**Post date:** [October 15, 2021, 1:43pm UTC](https://community.forestadmin.com/t/my-development-layout-is-back-to-an-old-version-how-can-i-restore-a-previous-version/3552/3 "2021-10-15T13:43:19Z")

</div>

I’m still stuck though. I have no production environment currently deployed and I’m not willing to spend a few hours to deploy one right now. But it seems there are no alternative to let me replace my broken local layout with a functional remote layout. This is maddening 🤯

I’ve tried `forest environments:copy-layout AwsDevelopment Production` and `forest environments:copy-layout AwsDevelopment Development`, but both commands return the following error:

```javascript
Error: Bad Request
    at PromiseRequest.Request.callback (~/Workspace/spotlit-admin/node_modules/forest-cli/node_modules/superagent/lib/node/index.js:857:15)
    at ~/Workspace/spotlit-admin/node_modules/forest-cli/node_modules/superagent/lib/node/index.js:1100:20
    at IncomingMessage.<anonymous> (~/Workspace/spotlit-admin/node_modules/forest-cli/node_modules/superagent/lib/node/parsers/json.js:22:7)

```

---

<div class="post-metadata">

**Author:** ![anon79585656](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@anon79585656](https://community.forestadmin.com/u/anon79585656)\
**Post date:** [October 15, 2021, 3:41pm UTC](https://community.forestadmin.com/t/my-development-layout-is-back-to-an-old-version-how-can-i-restore-a-previous-version/3552/4 "2021-10-15T15:41:41Z")

</div>

Hello @louisremi,

Thank you for sharing this with us, and sorry for the inconvenience.

First, could you tell me your project name so I can check how it is setup on our side.

In the absence of a production environment, one of your remote environments is considered the reference, and is used as a base for the development environments.  
When you deployed your changes from development to a remote, the development was kind of “restored” to the state of said reference.

The solution would be to deploy the second remote to the reference one.

I understand this is not ideal. Better layout change handling is planned, but I can’t share any release date for now.

---

<div class="post-metadata">

**Author:** ![louisremi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/louisremi/32/165_2.png) [@louisremi](https://community.forestadmin.com/u/louisremi)\
**Post date:** [October 15, 2021, 4:24pm UTC](https://community.forestadmin.com/t/my-development-layout-is-back-to-an-old-version-how-can-i-restore-a-previous-version/3552/5 "2021-10-15T16:24:29Z")

</div>

Hello, my project name is Spotlit

---

<div class="post-metadata">

**Author:** ![louisremi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/louisremi/32/165_2.png) [@louisremi](https://community.forestadmin.com/u/louisremi)\
**Post date:** [October 15, 2021, 4:46pm UTC](https://community.forestadmin.com/t/my-development-layout-is-back-to-an-old-version-how-can-i-restore-a-previous-version/3552/6 "2021-10-15T16:46:01Z")

</div>

I managed to deploy a server for my production environment as I had no alternative, and I was able copy my layout from my valid remote env to prod, then switch branch of my local env and my valid layout was back from the dead! At last!

---

<div class="post-metadata">

**Author:** ![louisremi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/louisremi/32/165_2.png) [@louisremi](https://community.forestadmin.com/u/louisremi)\
**Post date:** [October 21, 2021, 10:50am UTC](https://community.forestadmin.com/t/my-development-layout-is-back-to-an-old-version-how-can-i-restore-a-previous-version/3552/7 "2021-10-21T10:50:11Z")

</div>

@anon79585656 The problem happened once again!  
This morning I deployed code changes to my staging environment and once again the UI of my dev and staging (AwsDevelopment) environment switched to an old version. Not willing to deploy a production server once more, I just spent 20 minutes re-configuring all the UI manually on my dev environment (hoping I didn’t forget anything), then I tried to deploy this UI config to my staging env by using the method that I thought worked:

```javascript
$ forest schema:apply -s \\$FOREST_ENV_SECRET_AWSDEVELOPMENT
$ forest push -e AwsDevelopment

```

For some reason, this time the effect of these command was to revert the UI of my dev environment to the version just before I reconfigured everything manually !!!

To conclude : I have absolutely no clue of the right way to deploy UI changes from one environment to another. This sh\*t used to be simple, now it’s a complete mess. Please help me get back the manual changes I just did, or the version that was still in use yesterday (and this time I wont spend time deploying another production server). Thank you in advance.

---

<div class="post-metadata">

**Author:** ![anon79585656](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@anon79585656](https://community.forestadmin.com/u/anon79585656)\
**Post date:** [October 21, 2021, 1:30pm UTC](https://community.forestadmin.com/t/my-development-layout-is-back-to-an-old-version-how-can-i-restore-a-previous-version/3552/8 "2021-10-21T13:30:16Z")

</div>

Hello @louisremi,

Sorry to hear that.

With the `forest push` command, the layout changes you made should now be visible on your “AwsDevelopment” environment.

Can you please verify this?

If yes, it means you went from:

```javascript
            Production
          / \
         / \
        / \
   Dev + changes AwsDevelopment

```

To:

```javascript
            Production
          / \
         / \
        / \
   Dev AwsDevelopment + changes

```

The changes “moved” to your staging environment. Your dev has a clean slate, and will reflect previous changes after they are pushed to the production.

What you seem to need is to have your development branch “under” your staging environment. This is unfortunately not possible at the moment.

---

<div class="post-metadata">

**Author:** ![louisremi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/louisremi/32/165_2.png) [@louisremi](https://community.forestadmin.com/u/louisremi)\
**Post date:** [October 21, 2021, 2:02pm UTC](https://community.forestadmin.com/t/my-development-layout-is-back-to-an-old-version-how-can-i-restore-a-previous-version/3552/9 "2021-10-21T14:02:52Z")

</div>

No, unfortunately the changes I made this morning are nowhere to be found: they’re not on the Developement, and they’re not on the AwsDevelopment environment. Don’t you have a way to manually restore a layout on your side?  
I really don’t have time to setup a prod server right now but my client is frustrated by the regression of the UI. Thank you in advance.

---

<div class="post-metadata">

**Author:** ![anon79585656](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@anon79585656](https://community.forestadmin.com/u/anon79585656)\
**Post date:** [October 21, 2021, 3:11pm UTC](https://community.forestadmin.com/t/my-development-layout-is-back-to-an-old-version-how-can-i-restore-a-previous-version/3552/10 "2021-10-21T15:11:51Z")

</div>

@louisremi,

Sorry, but layout restoration is a feature only available on our entreprise plan and backups are performed once the plan is activated.

Can you tell me what kind of changes were lost?

Also, to investigate more, can you create a new branch on your dev environment, only make one small change (like hiding a column), push it to AwsDevelopment, and check if it is visible?

This may help finding the error origin.

Thank you
