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

# restore()

[View source](https://github.com/wandb/wandb/blob/main/wandb/sdk/wandb_run.py#L4041)

## function wandb.restore()

Download the specified file from cloud storage.

File is placed into the current directory or run directory.
By default, will only download the file if it doesn't already exist.

```python theme={"system"}
name: 'str',
run_path: 'str | None' = None,
replace: 'bool' = False,
root: 'str | None' = None
```

## Args

**name** `str`

The name of the file.

**run\_path** `str | None`

Optional path to a run to pull files from, i.e. `username/project_name/run_id` if wandb.init has not been called, this is required.

**replace** `bool`

Whether to download the file even if it already exists locally

**root** `str | None`

The directory to download the file to.  Defaults to the current directory or the run directory if wandb.init was called.

## Returns

None if it can't find the file, otherwise a file object open for reading.

## Raises

* `CommError`: If W\&B can't connect to the W\&B backend.
* `ValueError`: If the file is not found or can't find run\_path.
