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
Copy file name to clipboardExpand all lines: docs/advanced/3_cli/sync.mdx
+32-7
Original file line number
Diff line number
Diff line change
@@ -16,16 +16,41 @@ local development through the [VS Code extension](../../cli_local_dev/1_vscode-e
16
16
/>
17
17
</div>
18
18
19
-
## Raw syncing
19
+
Syncing is done using `wmill sync pull` & `wmill sync push`
20
20
21
-
Raw syncing will soon become the default.
21
+
Syncing is a one-off operation with no state maintained. It will override any item that is within the scope, and that are in the target and not in the source, and it will create new items that are in source but not in target.
22
+
It is a dangerous operation, that we recommend doing on a version-controlled folder to be able to revert any undesired changes made by mistake if necessary.
22
23
23
-
Raw syncing is a one-off operation with no state maintained. When using Windmill EE and [Git sync](../11_git_sync/index.mdx),
24
-
this is what you should use since Git sync will always keep your git repo up-to-date.
25
-
When not used in with Git sync. It's best used for
26
-
making backups, cloning a complete workspace, and similar one-off operations.
24
+
To specify the scopes of files, you should modify the includes and excludes (array of path matchers) part of the `wmill.yaml` file generated with `wmill init`. We recommend looking at all the settings of the `wmill.yaml` file to understand the different options available.
25
+
Those are the default ones:
27
26
28
-
Raw syncing is done using `wmill sync pull` & `wmill sync push`
27
+
```
28
+
defaultTs: bun
29
+
includes:
30
+
- f/**
31
+
excludes: []
32
+
codebases: []
33
+
skipVariables: true
34
+
skipResources: true
35
+
skipSecrets: true
36
+
includeSchedules: false
37
+
includeTriggers: false
38
+
```
39
+
40
+
Note that here, the variables, resources, secrets, schedules, and triggers are all skipped by default. You can change that by setting the corresponding options.g
41
+
42
+
When pulling, the source is the remote workspace and the target is the local folder, and when pushing, the source is the local folder and the target is the remote workspace.
43
+
44
+
To add a remote workspace, use `wmill workspace add`, and to switch workspace after having added multiple, use `wmill workspace switch <source_workspace_id>`.
45
+
46
+
```bash
47
+
wmill workspace switch <source_workspace_id>
48
+
wmill sync pull
49
+
wmill workspace switch <target_workspace_id>
50
+
wmill sync push
51
+
```
52
+
53
+
It can be used for bi-directional sync using Windmill EE and [Git sync](../11_git_sync/index.mdx).
0 commit comments