mirror of
https://github.com/borgbackup/borg.git
synced 2026-10-12 02:11:36 +00:00
All command lines were executed against scratch repositories and all output samples regenerated from real runs (prettified, not invented): - recreate: the example used the removed --recompress; show borg repo-compress instead; refresh the borg info samples. - diff: default/text output has modified:/added:/removed: labels and mtime/ctime brackets now; the JSON-lines example used borg1 keys and lacked --json-lines on the command; add --content-only. - mount: example passed the repository as a positional (it would have been taken as the mountpoint); use -r. - tar: the archive-copy loop was a bash syntax error and used borg list with repo-list-only format keys; replaced with a working while-read loop over borg repo-list (verified end-to-end, identical archive contents in the destination repo). - key: regenerate repo-create/change-passphrase samples (hex-id named keyfiles, Key location line, no "Synchronizing index"); the import example silently did nothing without --key-location=keyfile; fix the Windows keys path (AppData\Local, not Roaming); explain why the keyfile name changes on passphrase change. - transfer: the borg1->borg2 upgrade steps were missing --from-borg1 and used a ssh:// destination URL (rejected for current repos); fix the Windows keys path. - notes: --noatime and --nobsdflags no longer exist (atime is opt-in via --atime); stray "|" removed. - compact: segments wording removed. - info/repo-info/repo-delete/list/find: output samples regenerated (new labels/order, UTC offsets, repo version line, prompt text; isomtime format and symlink size corrected in list). - general: fix broken inline markup (stray backtick). - serve: the authorized_keys forced command needs --rest (it is deliberately not client-suppliable); document the actual client argument allowlist including --backend. Co-Authored-By: Claude Fable 5 <[email protected]>
61 lines
2.0 KiB
ReStructuredText
61 lines
2.0 KiB
ReStructuredText
.. include:: mount.rst.inc
|
|
|
|
.. include:: umount.rst.inc
|
|
|
|
Examples
|
|
~~~~~~~~
|
|
|
|
::
|
|
|
|
# Mounting the repository shows all archives (here: two archives of the series
|
|
# "root", the short archive id is appended to make the directory names unique).
|
|
# Archives are loaded lazily, expect some delay when navigating to an archive
|
|
# for the first time.
|
|
$ borg mount /tmp/mymountpoint
|
|
$ ls /tmp/mymountpoint
|
|
root-1f7b3c2a root-9e4d0b58
|
|
$ borg umount /tmp/mymountpoint
|
|
|
|
# BORG_MOUNT_ARCHIVE_DIR_FORMAT names the archive directories differently,
|
|
# using the placeholders of "borg repo-list --format":
|
|
$ BORG_MOUNT_ARCHIVE_DIR_FORMAT='{name}-{time:%Y-%m-%d}' borg mount /tmp/mymountpoint
|
|
$ ls /tmp/mymountpoint
|
|
root-2016-02-14 root-2016-02-15
|
|
$ borg umount /tmp/mymountpoint
|
|
|
|
# The "versions view" merges all archives in the repository
|
|
# and provides a versioned view on files.
|
|
$ borg mount -o versions /tmp/mymountpoint
|
|
$ ls -l /tmp/mymountpoint/home/user/doc.txt/
|
|
total 24
|
|
-rw-rw-r-- 1 user group 12357 Aug 26 21:19 doc.cda00bc9.txt
|
|
-rw-rw-r-- 1 user group 12204 Aug 26 21:04 doc.fa760f28.txt
|
|
$ borg umount /tmp/mymountpoint
|
|
|
|
# Archive filters are supported.
|
|
# These are especially handy for the "versions view",
|
|
# which does not support lazy processing of archives.
|
|
$ borg mount -o versions --match-archives 'sh:*-my-home' --last 10 /tmp/mymountpoint
|
|
|
|
# Exclusion options are supported.
|
|
# These can speed up mounting and lower memory needs significantly.
|
|
$ borg mount -r /path/to/repo /tmp/mymountpoint only/that/path
|
|
$ borg mount --exclude '...' /tmp/mymountpoint
|
|
|
|
|
|
borgfs
|
|
++++++
|
|
|
|
::
|
|
|
|
$ echo '/mnt/backup /tmp/myrepo fuse.borgfs defaults,noauto 0 0' >> /etc/fstab
|
|
$ mount /tmp/myrepo
|
|
$ ls /tmp/myrepo
|
|
root-2016-02-01 root-2016-02-15
|
|
|
|
.. Note::
|
|
|
|
``borgfs`` will be automatically provided if you used a distribution
|
|
package or ``pip`` to install Borg. Users of the standalone binary will have
|
|
to manually create a symlink (see :ref:`pyinstaller-binary`).
|