Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ade31e1

Browse files
committed
update sync
1 parent b4d1771 commit ade31e1

File tree

1 file changed

+32
-7
lines changed

1 file changed

+32
-7
lines changed

docs/advanced/3_cli/sync.mdx

+32-7
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,41 @@ local development through the [VS Code extension](../../cli_local_dev/1_vscode-e
1616
/>
1717
</div>
1818

19-
## Raw syncing
19+
Syncing is done using `wmill sync pull` & `wmill sync push`
2020

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.
2223

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:
2726

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).
2954

3055
### Pulling
3156

0 commit comments

Comments
 (0)