borg-diff(1) borg backup tool borg-diff(1) (NAME) borg-diff - Borg (SYNOPSIS) borg [common options] diff [options] REPO::ARCHIVE1 ARCHIVE2 [PATH...] (DESCRIPTION) ( //) . REPO::ARCHIVE1 . ARCHIVE2 ( ). (What is compared) Borg : o : / . (chunker) Borg (chunk IDs) . o : "[old_mode -> new_mode]" . --content-only . o / : "added SIZE path" "removed SIZE path" . (Output formats) () : +135 B -252 B [ -rw-r--r-- -> -rwxr-xr-x ] path/to/file JSON (--json-lines) JSON : {"path": "PATH", "changes": [ {"type": "modified", "added": BYTES, "removed": BYTES}, {"type": "mode", "old_mode": "-rw-r--r--", "new_mode": "-rwxr-xr-x"}, {"type": "added", "size": SIZE}, {"type": "removed", "size": SIZE} ]} "changes" . added=0 removed=0 . (Sorting) --sort-by FIELDS FIELDS . . ">" "<" ( ) --sort-by=">size_added,path". : o path: o size_added: o size_removed: o size_diff: size_added - size_removed ( ) o size: ARCHIVE2 ( ) o user, group, uid, gid, ctime, mtime: ARCHIVE2 o ctime_diff, mtime_diff: (archive2 - archive1) --sort . (Performance considerations) Borg 1.1 diff (chunker) . . Borg 1.1 . --same-chunker-params . Borg 0.xx 1.0 . / borg_patterns . (OPTIONS) Borg borg-common(1) . (arguments) REPO::ARCHIVE1 ARCHIVE1 ARCHIVE2 ARCHIVE2 ( ) PATH (options) --numeric-owner --numeric-ids --numeric-ids --same-chunker-params . --sort ( --sort-by=path ). --sort-by FIELDS : () . . > () < . --content-only ( ) --json-lines JSON. / (Include/Exclude options) -e PATTERN, --exclude PATTERN PATTERN --exclude-from EXCLUDEFILE EXCLUDEFILE --pattern PATTERN / PATTERN --patterns-from PATTERNFILE / PATTERNFILE (EXAMPLES) $ borg init -e=none testrepo $ mkdir testdir $ cd testdir $ echo asdf > file1 $ dd if=/dev/urandom bs=1M count=4 > file2 $ touch file3 $ borg create ../testrepo::archive1 . $ chmod a+x file1 $ echo "something" >> file2 $ borg create ../testrepo::archive2 . $ echo "testing 123" >> file1 $ rm file3 $ touch file4 $ borg create ../testrepo::archive3 . $ cd .. $ borg diff testrepo::archive1 archive2 [-rw-r--r-- -> -rwxr-xr-x] file1 +135 B -252 B file2 $ borg diff testrepo::archive2 archive3 +17 B -5 B file1 added 0 B file4 removed 0 B file3 $ borg diff testrepo::archive1 archive3 +17 B -5 B [-rw-r--r-- -> -rwxr-xr-x] file1 +135 B -252 B file2 added 0 B file4 removed 0 B file3 $ borg diff --json-lines testrepo::archive1 archive3 {"path": "file1", "changes": [{"type": "modified", "added": 17, "removed": 5}, {"type": "mode", "old_mode": "-rw-r--r--", "new_mode": "-rwxr-xr-x"}]} {"path": "file2", "changes": [{"type": "modified", "added": 135, "removed": 252}]} {"path": "file4", "changes": [{"type": "added", "size": 0}]} {"path": "file3", "changes": [{"type": "removed", "size": 0}]} # --sort-by . # : $ borg diff --sort-by=">size_diff,path" testrepo::archive1 archive3 +17 B -5 B [-rw-r--r-- -> -rwxr-xr-x] file1 removed 0 B file3 added 0 B file4 +135 B -252 B file2 (SEE ALSO) borg-common(1) (AUTHORS) The Borg Collective 2026-07-18 borg-diff(1)