Add a new data remote.
Depending on your storage type, you may also need
dvc remote modifyto provide credentials and/or configure other remote parameters.
usage: dvc remote add [-h] [--global | --system | --local] [-q | -v] [-d] [-f] name url positional arguments: name Name of the remote. url (See supported URLs in the examples below.)
This command creates a
remote section in the DVC project's
config file and optionally assigns a default
remote in the
core section, if the
--default option is used (recommended
for the first remote):
['remote "myremote"'] url = /tmp/dvcstore [core] remote = myremote
url are required. The
name is used to identify the remote and
must be unique for the project.
url specifies a location to store your data. It can represent a cloud storage
service, an SSH server, network-attached storage, or even a directory in the
local file system (see all the supported remote storage types in the examples
If you installed DVC via
pipand plan to use cloud services as remote storage, you might need to install these optional dependencies:
[ssh]. Alternatively, use
[all]to include them all. The command should look like this:
pip install "dvc[s3]". (This example installs
boto3library along with DVC to support S3 storage.)
--global- save remote configuration to the global config (e.g.
~/.config/dvc/config) instead of
--system- save remote configuration to the system config (e.g.
/etc/dvc/config) instead of
--local- modify a local config file instead of
.dvc/config. It is located in
.dvc/config.localand is Git-ignored. This is useful when you need to specify private config options in your config that you don't want to track and share through Git (credentials, private locations, etc).
--force- overwrite existing remote with new
--help- prints the usage/help message, and exit.
--quiet- do not write anything to standard output. Exit with 0 if no problems arise, otherwise 1.
--verbose- displays detailed tracing information.
The following are the types of remote storage (protocols) supported:
Add an Amazon S3 remote as the default (via the
-d option), and modify its
💡 Before adding an S3 remote, be sure to Create a Bucket.
$ dvc remote add -d myremote s3://mybucket/path Setting 'myremote' as a default remote. $ dvc remote modify myremote region us-east-2
The project's config file (
.dvc/config) now looks like this:
['remote "myremote"'] url = s3://mybucket/path region = us-east-2 [core] remote = myremote
The list of remotes should now be:
$ dvc remote list myremote s3://mybucket/path
You can overwrite existing remotes using
dvc remote add:
$ dvc remote add -f myremote s3://mybucket/another-path
List remotes again to view the updated remote:
$ dvc remote list myremote s3://mybucket/another-path