From 2e54b42a05de1ef5adb86cc0ec0b63438d373016 Mon Sep 17 00:00:00 2001 From: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> Date: Mon, 20 Jan 2025 15:03:45 +0100 Subject: [PATCH 1/3] DOCS-3383: Document home directory for data --- docs/data-ai/capture-data/advanced/how-sync-works.md | 12 ++++++++++++ docs/data-ai/capture-data/capture-sync.md | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/data-ai/capture-data/advanced/how-sync-works.md b/docs/data-ai/capture-data/advanced/how-sync-works.md index 06791229fd..ff4aa0c3d7 100644 --- a/docs/data-ai/capture-data/advanced/how-sync-works.md +++ b/docs/data-ai/capture-data/advanced/how-sync-works.md @@ -18,6 +18,18 @@ Data capture and cloud sync works differently for `viam-server` and `viam-micro- The data is captured locally on the machine's storage and, by default, stored in the `~/.viam/capture` directory. +{{% expand "Can't find the directory data is stored in? Click here." %}} + +The relative path for the data capture directory depends on where `viam-server` is run from, as well as the operating system of the machine. + +To find the `$HOME` vale, check your machine's logs on startup which will log it in the environment variables: + +```sh +2025-01-15T14:27:26.073Z INFO rdk server/entrypoint.go:77 Starting viam-server with following environment variables {"HOME":"/home/johnsmith"} +``` + +{{% /expand%}} + If a machine restarts for any reason, data capture automatically resumes and any data already stored but not yet synced is synced. The service can capture data from multiple resources at the same or different frequencies. diff --git a/docs/data-ai/capture-data/capture-sync.md b/docs/data-ai/capture-data/capture-sync.md index f412181305..19d99a1c69 100644 --- a/docs/data-ai/capture-data/capture-sync.md +++ b/docs/data-ai/capture-data/capture-sync.md @@ -119,7 +119,7 @@ The following attributes are available for the data management service: | `capture_dir` | string | Optional | Path to the directory on your machine where you want to store captured data. If you change the directory for data capture, only new data is stored in the new directory. Existing data remains in the directory where it was stored.
Default: `~/.viam/capture` |

| | `tags` | array of strings | Optional | Tags to apply to all images captured by this machine part. May include alphanumeric characters, underscores, and dashes. |

| | `sync_disabled` | bool | Optional | Toggle cloud sync on or off for the entire machine {{< glossary_tooltip term_id="part" text="part" >}}.
Default: `false` |

| -| `additional_sync_paths` | string array | Optional | Paths to any other directories on your machine from which you want to sync data to the cloud. Once data is synced from a directory, it is automatically deleted from your machine. |

| +| `additional_sync_paths` | string array | Optional | Paths to any other directories on your machine from which you want to sync data to the cloud. Once data is synced from a directory, it is automatically deleted from your machine. We recommend using absolute paths. For relative paths, see [How sync works](/data-ai/capture-data/advanced/how-sync-works/#cant-find-the-directory-data-is-stored-in-click-here). |

| | `sync_interval_mins` | float | Optional | Time interval in minutes between syncing to the cloud. Viam does not impose a minimum or maximum on the frequency of data syncing. However, in practice, your hardware or network speed may impose limits on the frequency of data syncing.
Default: `0.1`, meaning once every 6 seconds. |

| | `delete_data_on_part_deletion` | bool | Optional | Whether deleting this {{< glossary_tooltip term_id="machine" text="machine" >}} or {{< glossary_tooltip term_id="part" text="machine part" >}} should result in deleting all the data captured by that machine part.
Default: `false` |

| | `delete_every_nth_when_disk_full` | int | Optional | How many files to delete when local storage meets the [fullness criteria](/data-ai/capture-data/advanced/how-sync-works/#storage). The data management service will delete every Nth file that has been captured upon reaching this threshold. Use JSON mode to configure this attribute.
Default: `5`, meaning that every fifth captured file will be deleted. |

| From ebfce54b16103fd28aa8ce535ac2e5a69ffd71f8 Mon Sep 17 00:00:00 2001 From: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> Date: Mon, 20 Jan 2025 15:29:17 +0100 Subject: [PATCH 2/3] Update how-sync-works.md --- docs/data-ai/capture-data/advanced/how-sync-works.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/data-ai/capture-data/advanced/how-sync-works.md b/docs/data-ai/capture-data/advanced/how-sync-works.md index ff4aa0c3d7..58c0aa4ca5 100644 --- a/docs/data-ai/capture-data/advanced/how-sync-works.md +++ b/docs/data-ai/capture-data/advanced/how-sync-works.md @@ -25,7 +25,7 @@ The relative path for the data capture directory depends on where `viam-server` To find the `$HOME` vale, check your machine's logs on startup which will log it in the environment variables: ```sh -2025-01-15T14:27:26.073Z INFO rdk server/entrypoint.go:77 Starting viam-server with following environment variables {"HOME":"/home/johnsmith"} +2025-01-15T14:27:26.073Z INFO rdk server/entrypoint.go:77 Starting viam-server with following environment variables {"HOME":"/home/johnsmith"} ``` {{% /expand%}} From 4eed709cd5d007df0ae645f627c94edb2ca15644 Mon Sep 17 00:00:00 2001 From: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> Date: Tue, 21 Jan 2025 18:16:52 +0100 Subject: [PATCH 3/3] Update docs/data-ai/capture-data/advanced/how-sync-works.md Co-authored-by: Sierra Guequierre --- docs/data-ai/capture-data/advanced/how-sync-works.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/data-ai/capture-data/advanced/how-sync-works.md b/docs/data-ai/capture-data/advanced/how-sync-works.md index 58c0aa4ca5..8c738c0d28 100644 --- a/docs/data-ai/capture-data/advanced/how-sync-works.md +++ b/docs/data-ai/capture-data/advanced/how-sync-works.md @@ -22,7 +22,7 @@ The data is captured locally on the machine's storage and, by default, stored in The relative path for the data capture directory depends on where `viam-server` is run from, as well as the operating system of the machine. -To find the `$HOME` vale, check your machine's logs on startup which will log it in the environment variables: +To find the `$HOME` value, check your machine's logs on startup which will log it in the environment variables: ```sh 2025-01-15T14:27:26.073Z INFO rdk server/entrypoint.go:77 Starting viam-server with following environment variables {"HOME":"/home/johnsmith"}