Skip to content

Commit c95ad2d

Browse files
hannah-portainergitbook-bot
authored andcommitted
GITBOOK-19: How to move stacks to a new env FAQ
1 parent 561f93a commit c95ad2d

5 files changed

+42
-1
lines changed

.gitbook/assets/Remove env.png

176 KB
Loading

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@
379379
* [“Failed logging user activity” error in Portainer](faqs/troubleshooting/failed-logging-user-activity-error-in-portainer.md)
380380
* [Unable to Authenticate After Portainer Update](faqs/troubleshooting/unable-to-authenticate-after-portainer-update.md)
381381
* [How do I recover orphaned stacks from a previously deleted environment?](faqs/troubleshooting/how-do-i-recover-orphaned-stacks-from-a-previously-deleted-environment.md)
382+
* [How do I change the way I connect to an environment without losing my existing stacks?](faqs/troubleshooting/how-do-i-change-the-way-i-connect-to-an-environment-without-losing-my-existing-stacks.md)
382383
* [Contributing](faqs/contributing/README.md)
383384
* [How do I report a bug?](faqs/contributing/how-do-i-report-a-bug.md)
384385
* [How do I raise a feature request?](faqs/contributing/how-do-i-raise-a-feature-request.md)

faqs/troubleshooting/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ description: >-
4242
* [Why is my Portainer Edge Agent using a large amount of memory](why-is-my-portainer-edge-agent-using-a-large-amount-of-memory.md)
4343
* [“Failed logging user activity” Error in Portainer](failed-logging-user-activity-error-in-portainer.md)
4444
* [Unable to Authenticate After Portainer Update](unable-to-authenticate-after-portainer-update.md)
45+
* [How do I recover orphaned stacks from a previously deleted environment? ](how-do-i-recover-orphaned-stacks-from-a-previously-deleted-environment.md)
46+
* [How do I change the way I connect to an environment without losing my existing stacks?](how-do-i-change-the-way-i-connect-to-an-environment-without-losing-my-existing-stacks.md)
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# How do I change the way I connect to an environment without losing my existing stacks?
2+
3+
{% hint style="info" %}
4+
Note that these steps apply to Docker environments only.
5+
{% endhint %}
6+
7+
In the case of changing the way you connect to an environment (for example by moving from connecting to the Docker socket directly to using a socket proxy) you can move your stacks by:
8+
9+
{% stepper %}
10+
{% step %}
11+
### Removing the current environment connection in Portainer
12+
13+
Under **Administration**, navigate to **Environment-related**, then to **Environments**. Select the environment you would like to remove and click **Remove.** The stacks in this environment will become orphaned, and therefore available to be re-associated once you re-add the environment in the next step.
14+
15+
<figure><img src="../../.gitbook/assets/Remove env.png" alt=""><figcaption></figcaption></figure>
16+
{% endstep %}
17+
18+
{% step %}
19+
### Adding a new environment using the new connection method
20+
21+
[Add the environment again](../../admin/environments/add/) using the new connection method.
22+
{% endstep %}
23+
24+
{% step %}
25+
### Re-associating the orphaned stacks with the new environment
26+
27+
Within the environment that you want to associate your orphaned stacks with, click **Stacks** in the left hand menu. At the Stacks list, click on the three dots in the top right corner and select **Show all orphaned stacks**. Your stack list will then update to include any orphaned stacks.
28+
29+
<div align="left"><figure><img src="../../.gitbook/assets/orphaned stacks selection.png" alt=""><figcaption></figcaption></figure></div>
30+
31+
Click into the stack that you want to recover, and select **Associate.**
32+
33+
<div align="center"><figure><img src="../../.gitbook/assets/associate.png" alt=""><figcaption></figcaption></figure></div>
34+
35+
Your stack will now appear in your stack list with total control. Repeat this process for each stack you want to re-associate.&#x20;
36+
{% endstep %}
37+
{% endstepper %}
38+

faqs/troubleshooting/how-do-i-recover-orphaned-stacks-from-a-previously-deleted-environment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Stacks from an environment that has been deleted will be labelled as orphaned st
44

55

66

7-
1. Within the environment that you want to associate your orphaned stacks with, open the stacks list and click on the three dots in the top right corner, select **Show all orphaned stacks**. Your stack list will then update to include any orphaned stacks.
7+
1. Within the environment that you want to associate your orphaned stacks with, click **Stacks** in the left hand menu. At the Stacks list, click on the three dots in the top right corner and select **Show all orphaned stacks**. Your stack list will then update to include any orphaned stacks.
88

99
<div align="left"><figure><img src="../../.gitbook/assets/orphaned stacks selection.png" alt=""><figcaption></figcaption></figure></div>
1010

0 commit comments

Comments
 (0)