repository-urls.rst.inc 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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. If you frequently need the same repo URL, it is a good idea to set the
  16. ``BORG_REPO`` environment variable to set a default for the repo URL:
  17. ::
  18. export BORG_REPO='ssh://user@host:port/path/to/repo'
  19. Then just leave away the ``--repo`` option if you want
  20. to use the default - it will be read from BORG_REPO then.