Skip to content

Commit

Permalink
DOCS-3383: Document home directory for data (#3870)
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel authored Jan 21, 2025
1 parent 9b613ab commit 36cf3e0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions docs/data-ai/capture-data/advanced/how-sync-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` 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"}
```

{{% /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.
Expand Down
2 changes: 1 addition & 1 deletion docs/data-ai/capture-data/capture-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. <br> Default: `~/.viam/capture` | <p class="center-text"><i class="fas fa-check" title="yes"></i></p> |
| `tags` | array of strings | Optional | Tags to apply to all images captured by this machine part. May include alphanumeric characters, underscores, and dashes. | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |
| `sync_disabled` | bool | Optional | Toggle cloud sync on or off for the entire machine {{< glossary_tooltip term_id="part" text="part" >}}. <br> Default: `false` | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |
| `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. | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |
| `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). | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |
| `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. <br> Default: `0.1`, meaning once every 6 seconds. | <p class="center-text"><i class="fas fa-check" title="yes"></i></p> |
| `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. <br> Default: `false` | <p class="center-text"><i class="fas fa-check" title="yes"></i></p> |
| `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. <br> Default: `5`, meaning that every fifth captured file will be deleted. | <p class="center-text"><i class="fas fa-times" title="no"></i></p> |
Expand Down

0 comments on commit 36cf3e0

Please sign in to comment.