# Cloud sync and working offline

# Cloud sync and working offline

Phloem Computer records on your computer first and uploads after. A lost
network never stops a capture.

## What needs the cloud

| Works | Needs |
|---|---|
| Capture and recording | Nothing. Works offline and without signing in. |
| **Deploy** a Trellis setup, **Start run** | A computer that has signed in once. Then it works offline. |
| Cloud sync, remote replay | Signed in |
| Hamming, **Publish**, **Load published…**, **Recover from backup…**, installing a connector from the catalog | Signed in and online |

A button that needs the cloud shows a cloud mark. Pressing it while signed out
signs you in first. While offline, it is disabled and says why.

To use Computer with no account, press **Use this computer locally** on the
first screen. Sign in later from **Settings** › **Cloud connection** › **Sign in
to cloud**.

## How captures catch up

Every capture is written to disk first. When the cloud is reachable, Phloem
uploads it. When it is not, data waits on disk and uploads once the connection
returns.

Captures wait within the **Disk budget**. When the budget is full, the oldest
data not yet uploaded is deleted. An input over its share loses its own oldest
data first.

Set the budget in **Settings** › **Storage**:

| Setting | Does |
|---|---|
| **Disk budget** | Space for recordings waiting to sync |
| **Drain interval** | How often buffered data is uploaded |
| **Disk space warnings** | Notifies you when runs fill the budget, or it will fill within the hour |

**Disk budget by input** shows how much each input holds.

## Choose what to send

Open **Settings** › **Cloud sync** › **Send to the cloud**:

| Choice | Sends |
|---|---|
| **Everything** | All data, as it is captured |
| **Runs only** | Data inside a run, while the run is open. Data between runs stays on this computer. |
| **Local only** | Nothing. No data, and no project setup. The console still lists runs, marked "on device". |

When you widen the choice, Phloem sends what it kept before. The page says so
while it runs.

To keep one input off the cloud, click the cloud icon on its row and press
**Keep local**. **Sync to cloud** turns it back on.

## Check what reached the cloud

| Where | Shows |
|---|---|
| The cloud icon on an input's row in **Inputs** | That input's state, and captured against in-cloud counts |
| **Settings** › **Cloud sync** | One line for the whole computer, then **Upload**, **Time to catch up**, **Behind**, **Not in cloud** and **Disk free** |
| **Settings** › **Diagnostics** | **Missing from the cloud**: each input's missing data, when and why. **On this disk**: damage and data set aside. |
| `phloem audit --last 1h` | What was captured against what reached the cloud, for a window |
| `phloem doctor` | Checks this computer's setup |

The cloud icon reads:

| Reads | Means |
|---|---|
| **Up to date with the cloud** | Everything captured has synced |
| **Uploading · … queued** | Syncing; the amount is still to send |
| **Behind · … queued** | A backlog is catching up. Nothing is lost. |
| **Can't reach cloud · … queued** | Kept here until the connection returns |
| **Uploads failing · … queued** | Uploads are failing; data is kept here |
| **Not signed in — kept here** | Sign in to sync |
| **Local only — kept on this computer** | **Send to the cloud** is **Local only** |
| **Kept on this computer** | Sync is off for this input |

While offline, **Settings** › **Cloud sync** shows **Filling** and **Records
for** instead: how fast data builds up, and how long until the budget is full.

> **Note:** The budget can't use more than the disk's free space. When the disk
> is the limit, **Disk budget** says it is limited by disk. Check **Disk free**
> before a long offline run.

- [Verify that your data is arriving](https://phloem.ai/docs/guides/verify-data/): Check an input end to end
- [Where your data lives](https://phloem.ai/docs/workspace/data/): The tables your data lands in
- [Devices and fleets](https://phloem.ai/docs/workspace/devices/): Connect a computer to your workspace
