1Repository URLs 2~~~~~~~~~~~~~~~ 3 4**Local filesystem** (or locally mounted network filesystem): 5 6``/path/to/repo`` - filesystem path to repo directory, absolute path 7 8``path/to/repo`` - filesystem path to repo directory, relative path 9 10Also, stuff like ``~/path/to/repo`` or ``~other/path/to/repo`` works (this is 11expanded by your shell). 12 13Note: you may also prepend a ``file://`` to a filesystem path to get URL style. 14 15**Remote repositories** accessed via ssh user@host: 16 17``user@host:/path/to/repo`` - remote repo, absolute path 18 19``ssh://user@host:port/path/to/repo`` - same, alternative syntax, port can be given 20 21 22**Remote repositories with relative paths** can be given using this syntax: 23 24``user@host:path/to/repo`` - path relative to current directory 25 26``user@host:~/path/to/repo`` - path relative to user's home directory 27 28``user@host:~other/path/to/repo`` - path relative to other's home directory 29 30Note: giving ``user@host:/./path/to/repo`` or ``user@host:/~/path/to/repo`` or 31``user@host:/~other/path/to/repo`` is also supported, but not required here. 32 33 34**Remote repositories with relative paths, alternative syntax with port**: 35 36``ssh://user@host:port/./path/to/repo`` - path relative to current directory 37 38``ssh://user@host:port/~/path/to/repo`` - path relative to user's home directory 39 40``ssh://user@host:port/~other/path/to/repo`` - path relative to other's home directory 41 42 43If you frequently need the same repo URL, it is a good idea to set the 44``BORG_REPO`` environment variable to set a default for the repo URL: 45 46:: 47 48 export BORG_REPO='ssh://user@host:port/path/to/repo' 49 50Then just leave away the repo URL if only a repo URL is needed and you want 51to use the default - it will be read from BORG_REPO then. 52 53Use ``::`` syntax to give the repo URL when syntax requires giving a positional 54argument for the repo (e.g. ``borg mount :: /mnt``). 55