Skip to main content

What is Remote Storage?

Remote storage in DVC is where you store the actual data files, models, and artifacts tracked by DVC - separate from Git. While Git repositories contain .dvc files (metadata pointers), remote storage holds the real data. This enables teams to share large files without bloating Git repos.
Key Concept: Remote storage acts like a centralized cache. Team members push/pull data to/from remotes, similar to how Git push/pull works for code.

Why Remote Storage Matters

  • Collaboration: Share datasets and models with your team
  • Backup: Protect against data loss with cloud storage
  • Storage efficiency: Only download data you need
  • Version consistency: Ensure everyone uses the same data versions
  • Scale: Store terabytes of data without Git performance issues

How Remote Storage Works

The remote storage system is implemented in dvc/data_cloud.py. When you run commands like dvc push or dvc pull, DVC transfers data between your local cache and remote storage.

Architecture Overview

Supported Storage Types

DVC supports many storage backends:

Amazon S3

AWS S3 buckets

Google Cloud

GCS buckets

Azure Blob

Azure storage

SSH/SFTP

Remote servers

HDFS

Hadoop filesystem

HTTP/HTTPS

Web servers

Local/NFS

Local or network drives

WebDAV

WebDAV servers

OSS

Alibaba Cloud OSS

Setting Up a Remote

Add a remote storage location:
The -d flag sets it as the default remote.
Remote configurations are stored in .dvc/config (project) or .dvc/config.local (user-specific).

The DataCloud Class

Remote operations are managed by the DataCloud class in dvc/data_cloud.py:67-125:

Remote Class

Each remote is represented by a Remote object from dvc/data_cloud.py:21-50:

Pushing Data

Upload tracked files to remote storage:
The push implementation in dvc/data_cloud.py:168-198:
Use dvc push -j 16 to speed up uploads with parallel transfers. Adjust based on your network and storage.

Pulling Data

Download tracked files from remote storage:
DVC only downloads files that:
  • Are missing from your local cache
  • Have checksums different from what’s in cache
  • Are required by your current .dvc files

Checking Status

See what would be pushed/pulled:
Output shows:
  • Files that would be pushed
  • Files that would be pulled
  • Files not in cache

Remote Configuration

Configure remote settings in .dvc/config:
Or use commands:
Security: Never commit credentials to Git. Use .dvc/config.local for sensitive settings or environment variables.

Authentication

AWS S3

Google Cloud Storage

Azure Blob Storage

SSH

Advanced Features

Version-Aware Remotes

For cloud storage with versioning (S3, GCS, Azure):
This enables:
  • Tracking specific object versions
  • Time travel to previous data states
  • Protection against accidental overwrites

Worktree Remotes

Store data alongside another DVC repository:
This treats the remote as a full DVC workspace, not just a cache.

Read-Only Remotes

Prevent accidental pushes:

Custom Storage Paths

Organize remote storage:

Transfer Optimization

Parallel Jobs

Partial Downloads

Only download what you need:

Retry Configuration

Hash Algorithm Handling

DVC handles different hash algorithms for different storage types. From dvc/data_cloud.py:52-64:
This ensures compatibility between DVC versions and storage types:
  • Local: Uses md5 or md5-dos2unix
  • S3/GCS: Can use etag for efficiency
  • HDFS: Uses native checksum

Data Transfer Flow

When you run dvc push, the data flow is:
  1. Collect objects: Gather all tracked files needing upload
  2. Check remote: Query which files already exist remotely
  3. Transfer: Upload missing files using storage backend
  4. Verify: Confirm successful uploads
From dvc/data_cloud.py:157-166:

Multiple Remotes

You can configure multiple remotes for different purposes:

Storage Costs and Optimization

Deduplication

DVC’s content-addressable storage means identical files are stored once, even across projects

Compression

Some storage backends support transparent compression (configure per-remote)

Lifecycle Policies

Use cloud provider features to archive or delete old data automatically

Regional Storage

Store data in regions close to compute for faster access

Troubleshooting

Connection Issues

Permission Errors

Large File Performance

  • dvc remote - Manage remote storage configurations
  • dvc push - Upload data to remote storage
  • dvc pull - Download data from remote storage
  • dvc fetch - Download to cache without checking out
  • dvc status - Check data status vs remote

Next Steps

Data Versioning

Understand how data is tracked and versioned locally

Experiments

Share experiment results via remote storage