Skip to main content

Synopsis

Description

The dvc push command uploads DVC-tracked files and directories from your local cache to remote storage (such as S3, GCS, Azure, or SSH storage). This is analogous to git push but for your data files. It ensures that:
  • Your data is safely backed up in remote storage
  • Team members can access the data with dvc pull
  • CI/CD systems can fetch the necessary data
  • Different environments can sync the same data versions
dvc push only uploads files that don’t already exist in the remote storage, making it efficient for incremental updates.
You must configure a remote storage location before using dvc push. Use dvc remote add to set up a remote.

Options

path
Limit command scope to specific tracked files/directories, .dvc files, or stage names. If not specified, pushes all tracked data.
string
Remote storage to push to. If not specified, uses the default remote configured in .dvc/config.
integer
default:"4 * cpu_count()"
Number of jobs to run simultaneously. Higher values increase parallelism but use more resources.
boolean
default:"false"
Push cache for all Git branches. Useful for backing up all experiments.
This can upload a lot of data if you have many branches with different datasets.
boolean
default:"false"
Push cache for all Git tags.
boolean
default:"false"
Push cache for all Git commits.
This can be very slow and upload large amounts of data. Use with caution.
boolean
default:"false"
Push cache for all dependencies of the specified target.
boolean
default:"false"
Push cache for subdirectories of the specified directory.
boolean
default:"false"
Push run history for all stages. This includes execution metadata and can help reproduce pipeline runs.
boolean
default:"false"
Allows targets containing shell-style wildcards.

Examples

Basic push

Push all tracked data to the default remote:
Or if there are files to push:

Push specific files

Push only specific targets:

Push to specific remote

Push to a named remote:

Push with higher parallelism

Speed up push with more concurrent jobs:

Push all branches

Backup data from all branches:
This is useful for ensuring all experimental branches are backed up before cleanup.

Push with dependencies

Push a pipeline stage and all its dependencies:

Push with wildcards

Example workflows

Workflow 1: Regular development

Always dvc push before git push to ensure data is backed up before code references are published.

Workflow 2: After running pipeline

Workflow 3: Backup all experiments

Workflow 4: Team collaboration

Setting up remotes

Before using dvc push, configure a remote:

S3

Google Cloud Storage

Azure Blob Storage

SSH/SFTP

Local or Network Drive

Set as default:

Checking what needs to be pushed

Before pushing, check status:
This shows files in local cache that haven’t been pushed to remote.

Understanding push output

Or if everything is synced:
With multiple branches:

Error handling

No remote configured

Solution: Add a remote storage location:

Authentication errors

Solution: Configure credentials for your remote storage. Example for S3:

Network issues

If push fails due to network issues, simply run dvc push again. DVC will resume from where it left off.

Performance tips

Increase parallelism - Use --jobs to speed up uploads, especially for many small files:
Push specific targets - Instead of pushing everything, push only what changed:
Use cloud-native storage - For best performance, use storage in the same cloud region as your compute.

Best practices

  1. Always push before git push: Ensure data is backed up before publishing code
  2. Use —all-branches periodically: Backup experiment data before cleaning up branches
  3. Configure credentials securely: Use environment variables or IAM roles instead of storing credentials in config
  4. Monitor costs: Cloud storage and transfer costs can add up with large datasets
  • dvc pull - Download data from remote storage
  • dvc fetch - Download to cache without checking out
  • dvc status - Check sync status with remote
  • dvc remote - Manage remote storage locations