]> arthur.barton.de Git - bup.git/blobdiff - Documentation/bup-save.md
bup-restore.md: add more detail to the restore --map-* documentation.
[bup.git] / Documentation / bup-save.md
index 0384ff29d961a17113da1937cf9e271cd6dc8bc6..9b4097ed840a30feb103f2161b95ac28aad5ac47 100644 (file)
@@ -16,15 +16,21 @@ bup save [-r *host*:*path*] \<-t|-c|-n *name*\> [-#] [-f *indexfile*]
 `bup save` saves the contents of the given files or paths
 into a new backup set and optionally names that backup set.
 
+Note that in order to refer to your backup set later (i.e. for
+restoration), you must either specify `--name` (the normal case), or
+record the tree or commit id printed by `--tree` or `--commit`.
+
 Before trying to save files using `bup save`, you should
 first update the index using `bup index`.  The reasons
 for separating the two steps are described in the man page
 for `bup-index`(1).
 
-By default, metadata will be saved for every path.  However, if
-`--strip`, `--strip-path`, or `--graft` is specified, metadata will
-not be saved for the root directory (*/*).  See `bup-restore`(1) for
-more information about the handling of metadata.
+By default, metadata will be saved for every path, and the metadata
+for any unindexed parent directories of indexed paths will be taken
+directly from the filesystem.  However, if `--strip`, `--strip-path`,
+or `--graft` is specified, metadata will not be saved for the root
+directory (*/*).  See `bup-restore`(1) for more information about the
+handling of metadata.
 
 # OPTIONS
 
@@ -59,7 +65,7 @@ more information about the handling of metadata.
 
 -f, \--indexfile=*indexfile*
 :   use a different index filename instead of
-    `~/.bup/bupindex`.
+    `$BUP_DIR/bupindex`.
 
 -v, \--verbose
 :   increase verbosity (can be used more than once).  With
@@ -98,8 +104,8 @@ more information about the handling of metadata.
 :   strips the given path prefix *path-prefix* from all
     files and directories.
     
-    A directory */root/chroots/webserver* saved with "bup save -n
-    webserver \--strip-path=/root/chroots" would be saved as
+    A directory */root/chroot/webserver* saved with "bup save -n
+    webserver \--strip-path=/root/chroot" would be saved as
     */webserver/etc*.  Note that currently, metadata will not be saved
     for the root directory (*/*) when this option is specified.
     
@@ -107,9 +113,9 @@ more information about the handling of metadata.
 :   a graft point *old_path*=*new_path* (can be used more than
     once).
 
-    A directory */root/chroot/a/etc* saved with "bup save -n chroots
-    \--graft /root/chroot/a/etc=/chroots/a" would be saved as
-    */chroots/a/etc*.  Note that currently, metadata will not be saved
+    A directory */root/chroot/a/etc* saved with "bup save -n chroot
+    \--graft /root/chroot/a=/chroot/a" would be saved as
+    */chroot/a/etc*.  Note that currently, metadata will not be saved
     for the root directory (*/*) when this option is specified.
 
 -*#*, \--compress=*#*
@@ -129,13 +135,13 @@ more information about the handling of metadata.
 
 
 
-    $ ls /home/joe/chroots/httpd
+    $ ls /home/joe/chroot/httpd
     bin var
 
-    $ bup index -ux /home/joe/chroots/httpd
+    $ bup index -ux /home/joe/chroot/httpd
     Indexing: 1337, done.
 
-    $ bup save --strip -n joes-httpd-chroot /home/joe/chroots/httpd
+    $ bup save --strip -n joes-httpd-chroot /home/joe/chroot/httpd
     Reading index: 1337, done.
     Saving: 100.00% (998/998k, 1337/1337 files), done.
 
@@ -144,18 +150,18 @@ more information about the handling of metadata.
     var/
 
 
-    $ bup save --strip-path=/home/joe/chroots -n joes-chroots \
-         /home/joe/chroots/httpd
+    $ bup save --strip-path=/home/joe/chroot -n joes-chroot \
+         /home/joe/chroot/httpd
     Reading index: 1337, done.
     Saving: 100.00% (998/998k, 1337/1337 files), done.
 
-    $ bup ls joes-chroots/latest/
+    $ bup ls joes-chroot/latest/
     httpd/
 
 
-    $ bup save --graft /home/joe/chroots/httpd=/http-chroot \
+    $ bup save --graft /home/joe/chroot/httpd=/http-chroot \
          -n joe
-         /home/joe/chroots/httpd
+         /home/joe/chroot/httpd
     Reading index: 1337, done.
     Saving: 100.00% (998/998k, 1337/1337 files), done.