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
viam machines part restart --machine=123 --part=456
1212
+
1213
+
# Copy and a single file to a machine and change the file's name:
1214
+
viam machine part cp --organization=my_org --location=my_location --machine=my_machine --part=m1-main my_file machine:/home/user/
1215
+
1216
+
# Recursively copy a directory to a machine:
1217
+
viam machine part cp --machine=123 --part=123 -r my_dir machine:/home/user/
1218
+
1219
+
# Copy multiple files to a machine with recursion and keep original permissions and metadata for the files:
1220
+
viam machine part cp --machine=123 --part=123 -r -p my_dir my_file machine:/home/user/some/existing/dir/
1221
+
1222
+
# Copy a single file from a machine to a local destination:
1223
+
viam machine part cp --machine=123 --part=123 machine:my_file ~/Downloads/
1224
+
1225
+
# Recursively copy a directory from a machine to a local destination:
1226
+
viam machine part cp --machine=123 --part=123 -r machine:my_dir ~/Downloads/
1227
+
1228
+
# Copy multiple files from the machine to a local destination with recursion and keep original permissions and metadata for the files:
1229
+
viam machine part cp --machine=123 --part=123 -r -p machine:my_dir machine:my_file ~/some/existing/dir/
1211
1230
```
1212
1231
1213
1232
#### Command options
@@ -1219,7 +1238,7 @@ viam machines part restart --machine=123 --part=456
1219
1238
|`api-key`| Work with an api-key for your machine |`create` (see [positional arguments: api-key](#positional-arguments-api-key)) |
1220
1239
|`status`| Retrieve machine status for a specified machine | - |
1221
1240
|`logs`| Retrieve logs for a specified machine | - |
1222
-
|`part`| Manage a specified machine part |`status`, `run`, `logs`, `shell`, `restart` (see [positional arguments: part](#positional-arguments-part)) |
1241
+
|`part`| Manage a specified machine part |`status`, `run`, `logs`, `shell`, `restart`, `cp` (see [positional arguments: part](#positional-arguments-part)) |
1223
1242
|`--help`| Return help | - |
1224
1243
1225
1244
##### Positional arguments: `api-key`
@@ -1240,6 +1259,7 @@ viam machines part restart --machine=123 --part=456
1240
1259
|`logs`| Get logs for the specified machine part |
1241
1260
|`shell`| Access a machine part securely using a secure shell. To use this feature you must add the [`ViamShellDanger` fragment](https://app.viam.com/fragment/b511adfa-80ab-4a70-9bd5-fbb14696b17e/json) to your machine. |
1242
1261
|`restart`| Restart a machine part. |
1262
+
|`cp`| Copy files to and from a machine part. |
1243
1263
|`--help`| Return help |
1244
1264
1245
1265
##### Named arguments
@@ -1249,7 +1269,7 @@ viam machines part restart --machine=123 --part=456
|`--organization`| Organization name or ID that the machine belongs to |`list`, `status`, `logs`, `part`|**Required**|
1251
1271
|`--location`| Location name or ID that the machine belongs to or to list machines in |`list`, `status`, `logs`, `part`|**Required**|
1252
-
|`--machine`| Machine name or ID for which the command is being issued|`status`, `logs`, `part`, `part restart`|**Required**|
1272
+
|`--machine`| Machine name or ID for which the command is being issued. If machine name is used instead of ID, `--organization` and `--location` are required. |`status`, `logs`, `part`|**Required**|
1253
1273
|`--errors`| Boolean, return only errors (default: false) |`logs`| Optional |
1254
1274
|`--levels`| Filter logs by levels (debug, info, warn, error). Accepts multiple inputs in comma-separated list. |`logs`| Optional |
1255
1275
|`--part`| Part name or ID for which the command is being issued |`logs`, `part`| Optional |
@@ -1265,6 +1285,8 @@ viam machines part restart --machine=123 --part=456
1265
1285
|`--machine-id`| The machine to create an API key for |`api-key`|**Required**|
1266
1286
|`--name`| The optional name of the API key |`api-key`| Optional |
1267
1287
|`--org-id`| The optional organization ID to attach the key to |`api-key`| Optional |
0 commit comments