repository-urls.rst.inc 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. Repository URLs
  2. ~~~~~~~~~~~~~~~
  3. **Local filesystem** (or locally mounted network filesystem):
  4. ``/path/to/repo`` — filesystem path to the repository directory (absolute path)
  5. ``path/to/repo`` — filesystem path to the repository directory (relative path)
  6. Also, paths like ``~/path/to/repo`` or ``~other/path/to/repo`` work (this is
  7. expanded by your shell).
  8. Note: You may also prepend ``file://`` to a filesystem path to use URL style.
  9. **Remote repositories** accessed via SSH user@host:
  10. ``ssh://user@host:port//abs/path/to/repo`` — absolute path
  11. ``ssh://user@host:port/rel/path/to/repo`` — path relative to the current directory
  12. **Remote repositories** accessed via SFTP:
  13. ``sftp://user@host:port//abs/path/to/repo`` — absolute path
  14. ``sftp://user@host:port/rel/path/to/repo`` — path relative to the current directory
  15. For SSH and SFTP URLs, the ``user@`` and ``:port`` parts are optional.
  16. **Remote repositories** accessed via rclone:
  17. ``rclone:remote:path`` — see the rclone docs for more details about ``remote:path``.
  18. **Remote repositories** accessed via S3:
  19. ``(s3|b2):[profile|(access_key_id:access_key_secret)@][schema://hostname[:port]]/bucket/path`` — see the boto3 docs for more details about credentials.
  20. If you are connecting to AWS S3, ``[schema://hostname[:port]]`` is optional, but ``bucket`` and ``path`` are always required.
  21. Note: There is a known issue with some S3-compatible services, e.g., Backblaze B2. If you encounter problems, try using ``b2:`` instead of ``s3:`` in the URL.
  22. If you frequently need the same repository URL, it is a good idea to set the
  23. ``BORG_REPO`` environment variable to set a default repository URL:
  24. ::
  25. export BORG_REPO='ssh://user@host:port/rel/path/to/repo'
  26. Then simply omit the ``--repo`` option when you want
  27. to use the default — it will be read from BORG_REPO.