> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trycassian.com/llms.txt
> Use this file to discover all available pages before exploring further.

# File Sync

> Keep local and remote in sync.

## How it works

Your local files sync to `/workspace` in the container. Cassian tracks which files changed and only transfers the diff, so syncing one edited script takes milliseconds, not seconds.

* **`cassian up`**: pushes changed local files to the container before it's ready
* **`cassian ssh`**: syncs both ways while connected
* **`cassian exec`**: pushes files before running the command
* **`cassian sync`**: one-shot pull from container to local

## What syncs where

| Location             | Syncs locally | Persists in cloud     |
| -------------------- | ------------- | --------------------- |
| `/workspace`         | Yes           | Yes                   |
| `/workspace/storage` | No            | Yes, always available |
| `no_sync` folders    | No            | Yes                   |
| `exclude` folders    | No            | No                    |

## Incremental sync

Cassian compares file sizes between local and the remote before pushing. Only files that changed get transferred. On repeat `cassian up` with no changes, sync completes in under a second.

## Background save

Your workspace saves to the cloud every 30 seconds while the instance is running. If the machine crashes, you lose at most 30 seconds of work.

## Size limits

Workspace pushes are limited to 2GB. You'll get a warning above 500MB. If you hit the limit, move large assets to `workspace.no_sync` or `workspace.storage` in `cassian.yaml`.

## Ignoring files

```yaml theme={null}
workspace:
  exclude:
    - ".venv/"
    - "__pycache__/"
    - "node_modules/"
    - "*.pyc"
```

Excluded folders are never pushed, never saved to cloud, and never pulled down.
