Răsfoiți Sursa

Merge pull request #2223 from kmq/1.0-maint

document snapshot usage #2178
TW 8 ani în urmă
părinte
comite
dd8df84fe5
3 a modificat fișierele cu 17 adăugiri și 5 ștergeri
  1. 11 3
      borg/archiver.py
  2. 1 1
      docs/faq.rst
  3. 5 1
      docs/usage.rst

+ 11 - 3
borg/archiver.py

@@ -1355,9 +1355,12 @@ class Archiver:
 
 
         create_epilog = textwrap.dedent("""
         create_epilog = textwrap.dedent("""
         This command creates a backup archive containing all files found while recursively
         This command creates a backup archive containing all files found while recursively
-        traversing all paths specified. When giving '-' as path, borg will read data
-        from standard input and create a file 'stdin' in the created archive from that
-        data.
+        traversing all paths specified. Paths are added to the archive as they are given,
+        that means if relative paths are desired, the command has to be run from the correct
+        directory.
+
+        When giving '-' as path, borg will read data from standard input and create a
+        file 'stdin' in the created archive from that data.
 
 
         The archive will consume almost no disk space for files or parts of files that
         The archive will consume almost no disk space for files or parts of files that
         have already been stored in other archives.
         have already been stored in other archives.
@@ -1374,6 +1377,11 @@ class Archiver:
         potentially decreases reliability of change detection, while avoiding always reading
         potentially decreases reliability of change detection, while avoiding always reading
         all files on these file systems.
         all files on these file systems.
 
 
+        The mount points of filesystems or filesystem snapshots should be the same for every
+        creation of a new archive to ensure fast operation. This is because the file cache that
+        is used to determine changed files quickly uses absolute filenames.
+        If this is not possible, consider creating a bind mount to a stable location.
+
         See the output of the "borg help patterns" command for more help on exclude patterns.
         See the output of the "borg help patterns" command for more help on exclude patterns.
         See the output of the "borg help placeholders" command for more help on placeholders.
         See the output of the "borg help placeholders" command for more help on placeholders.
         """)
         """)

+ 1 - 1
docs/faq.rst

@@ -422,7 +422,7 @@ BORG_FILES_CACHE_TTL to at least 26 (or maybe even a small multiple of that),
 it would be much faster.
 it would be much faster.
 
 
 Another possible reason is that files don't always have the same path, for
 Another possible reason is that files don't always have the same path, for
-example if you mount a filesystem without stable mount points for each backup.
+example if you mount a filesystem without stable mount points for each backup or if you are running the backup from a filesystem snapshot whose name is not stable.
 If the directory where you mount a filesystem is different every time,
 If the directory where you mount a filesystem is different every time,
 |project_name| assume they are different files.
 |project_name| assume they are different files.
 
 

+ 5 - 1
docs/usage.rst

@@ -435,6 +435,11 @@ Examples
     # As above, but add nanoseconds
     # As above, but add nanoseconds
     $ borg create /path/to/repo::{hostname}-{user}-{now:%Y-%m-%dT%H:%M:%S.%f} ~
     $ borg create /path/to/repo::{hostname}-{user}-{now:%Y-%m-%dT%H:%M:%S.%f} ~
 
 
+    # Backing up relative paths by moving into the correct directory first
+    $ cd /home/user/Documents
+    # The root directory of the archive will be "projectA"
+    $ borg create /path/to/repo::daily-projectA-{now:%Y-%m-%d} projectA
+
 Notes
 Notes
 ~~~~~
 ~~~~~
 
 
@@ -443,7 +448,6 @@ Notes
   '\*/.bundler/gems' to get the same effect. See ``borg help patterns`` for
   '\*/.bundler/gems' to get the same effect. See ``borg help patterns`` for
   more information.
   more information.
 
 
-
 .. include:: usage/extract.rst.inc
 .. include:: usage/extract.rst.inc
 
 
 Examples
 Examples