repository-urls.rst.inc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. Repository URLs
  2. ~~~~~~~~~~~~~~~
  3. **Local filesystem** (or locally mounted network filesystem):
  4. ``/path/to/repo`` - filesystem path to repo directory, absolute path
  5. ``path/to/repo`` - filesystem path to repo directory, relative path
  6. Also, stuff like ``~/path/to/repo`` or ``~other/path/to/repo`` works (this is
  7. expanded by your shell).
  8. Note: you may also prepend a ``file://`` to a filesystem path to get URL style.
  9. **Remote repositories** accessed via ssh user@host:
  10. ``ssh://user@host:port/path/to/repo`` - absolute path
  11. ``ssh://user@host:port/./path/to/repo`` - path relative to current directory
  12. ``ssh://user@host:port/~/path/to/repo`` - path relative to user's home directory
  13. **Remote repositories** accessed via sftp:
  14. ``sftp://user@host:port/path/to/repo`` - absolute path
  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.
  18. If you frequently need the same repo URL, it is a good idea to set the
  19. ``BORG_REPO`` environment variable to set a default for the repo URL:
  20. ::
  21. export BORG_REPO='ssh://user@host:port/path/to/repo'
  22. Then just leave away the ``--repo`` option if you want
  23. to use the default - it will be read from BORG_REPO then.