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
| verbose | bool |`False`| verbose mode: currently prints rsync command before executing |
50
59
|**kwargs | dict | Not Applicable | arguments that will be forwarded to call to `sysrsync.get_rsync_command`|
51
60
61
+
**returns**: `subprocess.CompletedProcess`
62
+
63
+
**raises**: `RsyncError` when `strict = True` and rsync return code is different than 0 ([Success](https://lxadm.com/Rsync_exit_codes#List_of_standard_rsync_exit_codes))
64
+
52
65
`sysrsync.get_rsync_command`
53
66
54
67
| argument | type | default | description |
55
68
| --------- | ---- | ------- | ----------- |
69
+
| source | str | - | Source folder or file |
70
+
| destination | str | - | Destination folder |
71
+
| source_ssh | Optional[str]| None | Remote ssh client where source is located |
72
+
| destination_ssh | Optional[str]| None | Remote ssh client where destination is located |
73
+
| exclusions | Iterable[str]|[]| List of excluded patterns as in rsync's `--exclude`|
74
+
| sync_source_contents | bool | True | Abstracts the elusive trailing slash behaviour that `source` normally has when using rsync directly, i.e. when a trailing slash is present in `source`, the folder's content is synchronized with destination. When no trailing slash is present, the folder itself is synchronized with destination. |
75
+
| options | Iterable[str]|[]| List of options to be used right after rsync call, e.g. `['-a', '-v']` translates to `rsync -a -v`|
56
76
77
+
**returns**: `List[str]` -> the compiled list of commands to be used directly in `subprocess.run`
57
78
58
-
59
-
##
79
+
**raises**: `RemotesError` when both `source_ssh` and `target_ssh` are set. Normally linux rsync distribution disallows source and destination to be both remotes.
0 commit comments