You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
* Add the correct cli commands for migrating files
* fix problems from test
* Improved rsync remote to remote, added better example to cli
* add remote to remote recommendation
* some fixes for the notes
If you encounter errors or need to change project configuration, complete the required updates in your local environment. Then, push the code changes to the Integration environment to deploy and test before pushing to Staging and Production environments.
@@ -27,21 +27,23 @@ You can use the [Project Web Interface](#interface) or [SSH and CLI commands](#s
27
27
28
28
The Project Web Interface provides features to create, manage, and deploy code in Integration, Staging, and Production environments for Starter and Pro plans.
29
29
30
-
For Pro projects, deploy the Integration branch you created to Staging and Production:
30
+
{:.procedure}
31
+
For Pro projects, deploy the Integration branch to Staging and Production:
31
32
32
33
1.[Log in](https://accounts.magento.cloud) to your project.
33
34
1. Select the Integration branch.
34
35
1. Select the **Merge** option to deploy to Staging. Complete all testing.
35
36
1. Select the Staging branch.
36
37
1. Select the **Merge** option to deploy to Production.
37
38
38
-
For Starter, deploy the development branch you created to Staging and Production:
39
+
{:.procedure}
40
+
For Starter, deploy the development branch you created to Staging and Production (master):
39
41
40
42
1.[Log in](https://accounts.magento.cloud) to your project.
41
43
1. Select the prepared code branch.
42
44
1. Select the **Merge** option to deploy to Staging. Complete all testing.
43
45
1. Select the Staging branch.
44
-
1. Select the **Merge** option to deploy to Production.
46
+
1. Select the **Merge** option to deploy to Master.
45
47
46
48

47
49
@@ -54,7 +56,7 @@ You can use the [Magento Cloud CLI commands]({{ site.baseurl }}/cloud/reference/
54
56
-[Build and deploy on local]({{ site.baseurl }}/cloud/live/live-sanity-check.html)
55
57
-[Prepare to deploy to Staging and Production]({{ site.baseurl }}/cloud/live/stage-prod-migrate-prereq.html)
56
58
57
-
#### Step 1: Deploy and test the Integration environment:
59
+
#### Step 1: Deploy and test the Integration environment
58
60
59
61
1. After logging into the project, check out the Integration environment:
60
62
@@ -112,7 +114,7 @@ You can use the [Magento Cloud CLI commands]({{ site.baseurl }}/cloud/reference/
112
114
113
115
1. Complete site testing.
114
116
115
-
#### Step 3: Deploy to Production:
117
+
#### Step 3: Deploy to Production
116
118
117
119
1. Check out, synchronize, and create a snapshot of your local Production environment.
118
120
@@ -124,13 +126,63 @@ You can use the [Magento Cloud CLI commands]({{ site.baseurl }}/cloud/reference/
[Static files](https://glossary.magento.com/static-files) are stored in `mounts`. There are two methods for migrating files from a source mount location, such as your local environment, to a destination mount location. Both methods use the `rsync` utility, but we recommend using the `magento-cloud` CLI for moving files between the local and remote environment. And we recommend using the `rsync` method when moving files from a remote source to a different remote location.
132
+
133
+
### Migrate files using the CLI
134
+
135
+
You can use the `mount:upload` and `mount:download` CLI commands to migrate files between the local and remote environment. Both commands use the `rsync` utility, but the CLI commands provide options and prompts tailored to the {{site.data.var.ece}} environment. For example, if you use the simple command with no options, the CLI prompts you to select which mount or mounts to upload or download.
136
+
137
+
```bash
138
+
magento-cloud mount:download
139
+
```
140
+
141
+
Sample response:
128
142
129
-
You migrate [static files](https://glossary.magento.com/static-files) from your `pub/media` directory to Staging or Production.
143
+
```terminal
144
+
Enter a number to choose a mount to download from:
145
+
[0] app/etc
146
+
[1] pub/static
147
+
[2] var
148
+
[3] pub/media
149
+
[4] All mounts
150
+
> 3
130
151
131
-
We recommend using the Linux remote synchronization and file transfer command [`rsync`](https://en.wikipedia.org/wiki/Rsync). The rsync utility uses an algorithm that minimizes the amount of data by moving only the portions of files that have changed. Rsync also supports compression.
152
+
Target directory: ~/pub/media/
132
153
133
-
Use the following command to migrate files:
154
+
Downloading files from the remote mount pub/media to pub/media
155
+
156
+
Are you sure you want to continue? [Y/n] Y
157
+
```
158
+
159
+
{:.procedure}
160
+
To upload files from a local `pub/media/` folder to the remote `pub/media/` folder for the current environment:
Uploading files from pub/media to the remote mount pub/media
170
+
171
+
Are you sure you want to continue? [Y/n] Y
172
+
173
+
building file list ... done
174
+
./
175
+
sample-file.jpeg
176
+
177
+
sent 8.43K bytes received 48 bytes 3.39K bytes/sec
178
+
total size is 154.57K speedup is 18.23
179
+
```
180
+
181
+
Use the `--help` option for the `mount:upload` and `mount:download` commands to see more options. For example, there is a `--delete` option to remove extraneous files during the migration.
182
+
183
+
### Migrate files using rsync
184
+
185
+
Alternatively, you can use the `rsync` utility to migrate files.
For additional options, see the [rsync man page](http://linux.die.net/man/1/rsync).
147
-
148
-
To migrate static files from your local machine, use the `rsync` command to copy the `pub/media` directory from your local Magento server to staging or production:
198
+
See the [rsync man page](http://linux.die.net/man/1/rsync).
To transfer media from remote-to-remote environments directly, you must enable SSH agent forwarding, see [GitHub guidance](https://developer.github.com/v3/guides/using-ssh-agent-forwarding/).
153
202
154
203
{:.procedure}
155
204
To migrate static files from remote-to-remote environments directly (fast approach):
156
205
157
-
{:.bs-callout-info}
158
-
To transfer media from remote-to-remote environments directly, you must enable ssh agent forwarding, see [GitHub guidance](https://developer.github.com/v3/guides/using-ssh-agent-forwarding/).
159
-
160
-
1.[Open an SSH connection]({{ site.baseurl }}/cloud/env/environments-ssh.html#ssh) to the source environment.
206
+
1. Use SSH to log in to the source environment. Do not use the `magento-cloud` CLI. Using the `-A` option is very important because it enables forwarding of the authentication agent connection.
161
207
162
-
To find the **SSH access** link in your Project Web Interface, select the environment and click **Access Site**. The syntax for the SSH command is as follows:
208
+
{:.bs-callout-tip}
209
+
To find the **SSH access** link in your Project Web Interface, select the environment and click **Access Site**.
0 commit comments