> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-dependabot-github-actions-actions-cache-6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# wandb sync

export const GitHubLink = ({url}) => <a href={url} target="_blank" rel="noopener noreferrer" className="github-source-link">
    <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
      <path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" />
    </svg>
    GitHub source
  </a>;

<GitHubLink url="https://github.com/wandb/wandb/blob/v0.28.0/wandb/cli/cli.py#L561" />

## Usage

```bash theme={null}
sync [OPTIONS] [PATH]...
```

## Description

Upload existing local W\&B run data to the cloud.

Sync offline or incomplete runs from the local `wandb` directory to
the W\&B server. If PATH is provided, sync runs at that path. If no
path is given, search for a ./wandb directory, then a wandb/
subdirectory.

Run without arguments to print a summary of synced and unsynced
runs without uploading anything.

When syncing a specific path, include TensorBoard event files
by default. When using `--sync-all`, disable TensorBoard by
default (use `--sync-tensorboard` to enable it).

PATH is a .wandb file or a run directory that contains a .wandb file.
A typical path looks like:

./wandb/run-YYYYMMDD\_HHMMSS-RUN\_ID/run-RUN\_ID.wandb

where run-YYYYMMDD\_HHMMSS-RUN\_ID is the run directory and
run-RUN\_ID.wandb is the .wandb file. YYYYMMDD\_HHMMSS is the
timestamp of when the run was created and RUN\_ID is the unique ID
of the run.

For example, to show a summary of local runs and their sync status:

```bash theme={null}
wandb sync
```

To sync run ID abcd1234 that is locally saved locally in
the ./wandb/run-20170617\_000000-abcd1234 directory:

```bash theme={null}
wandb sync ./wandb/run-20170617_000000-abcd1234
```

To sync run abcd1234 by its local .wandb
filepath (./wandb/run-20170617\_000000-abcd1234/run-abcd1234.wandb):

```bash theme={null}
wandb sync ./wandb/run-20170617_000000-abcd1234/run-abcd1234.wandb
```

To sync all unsynced runs in the local wandb directory:

```bash theme={null}
wandb sync --sync-all
```

To delete local data for runs that have already been synced:

```bash theme={null}
wandb sync --clean
```

To delete synced runs older than 48 hours without a confirmation prompt:

```bash theme={null}
wandb sync --clean --clean-old-hours 48 --clean-force
```

## Arguments

| Name   | Default | Type  |
| ------ | ------- | ----- |
| `path` | PATH    | False |

## Options

| Flag                 | Type      | Description                                                                                             |
| -------------------- | --------- | ------------------------------------------------------------------------------------------------------- |
| `--id`               | STR       | Upload to an existing run ID. **Default**: None                                                         |
| `--project, -p`      | STR       | Set the project to upload the run to. **Default**: None                                                 |
| `--entity, -e`       | STR       | Set the entity to scope the project to. **Default**: None                                               |
| `--job_type`         | STR       | Set the job type to group related runs. **Default**: None                                               |
| `--sync-tensorboard` | BOOL Flag | Sync TensorBoard tfevent files. On by default for specific paths, off for --sync-all. **Default**: None |
| `--include-globs`    | STR       | Include only runs matching these glob patterns (comma-separated). **Default**: None                     |
| `--exclude-globs`    | STR       | Exclude runs matching these glob patterns (comma-separated). **Default**: None                          |
| `--include-online`   | BOOL Flag | Include runs created in online mode. **Default**: None                                                  |
| `--include-offline`  | BOOL Flag | Include runs created in offline mode. **Default**: None                                                 |
| `--include-synced`   | BOOL Flag | Include runs that are already synced. **Default**: None                                                 |
| `--mark-synced`      | BOOL Flag | Mark runs as synced after upload. **Default**: True                                                     |
| `--sync-all`         | BOOL Flag | Sync all unsynced runs in the local wandb directory. **Default**: False                                 |
| `--clean`            | BOOL Flag | Delete local data for runs that are already synced. **Default**: False                                  |
| `--clean-old-hours`  | INT       | Delete only synced runs older than this many hours (use with --clean). **Default**: 24                  |
| `--clean-force`      | BOOL Flag | Skip the confirmation prompt if --clean is specified. **Default**: False                                |
| `--show`             | INT       | Set the number of runs to show in the summary. **Default**: 5                                           |
| `--append`           | BOOL Flag | Append data to an existing run instead of creating a new run. **Default**: False                        |
| `--skip-console`     | BOOL Flag | Skip uploading console logs. **Default**: False                                                         |
| `--replace-tags`     | STR       | Rename tags during sync. Use 'old=new' pairs separated by commas. **Default**: None                     |
