]> arthur.barton.de Git - bup.git/blobdiff - Documentation/bup-save.md
Merge branch 'master' into config
[bup.git] / Documentation / bup-save.md
index 638e5019d2710204e1ffb6f8e9b3d9830dea27b2..e895a2b880d94d8e4dbf97d0e503ab6019835bd8 100644 (file)
@@ -8,7 +8,7 @@ bup-save - create a new bup backup set
 
 # SYNOPSIS
 
-bup save [-r *host*:*path*] <-t|-c|-n *name*> [-f *indexfile*]
+bup save [-r *host*:*path*] <-t|-c|-n *name*> [-#] [-f *indexfile*]
 [-v] [-q] [--smaller=*maxsize*] <paths...>
 
 # DESCRIPTION
@@ -26,7 +26,10 @@ for `bup-index`(1).
 -r, --remote=*host*:*path*
 :   save the backup set to the given remote server.  If
     *path* is omitted, uses the default path on the remote
-    server (you still need to include the ':')
+    server (you still need to include the ':').  The connection to the
+    remote server is made with SSH.  If you'd like to specify which port, user
+    or private key to use for the SSH connection, we recommend you use the
+    `~/.ssh/config` file.
 
 -t, --tree
 :   after creating the backup set, print out the git tree
@@ -89,21 +92,69 @@ for `bup-index`(1).
     "bup save -n webserver --strip-path=/root/chroots" would
     be saved as */webserver/etc*
     
+--graft=*old_path*=*new_path*
+:   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*
+
+-*#*, --compress=*#*
+:   set the compression level to # (a value from 0-9, where
+    9 is the highest and 0 is no compression).  The default
+    is 1 (fast, loose compression)
+
 
 # EXAMPLE
-    
+
     $ bup index -ux /etc
     Indexing: 1981, done.
-    
+
     $ bup save -r myserver: -n my-pc-backup --bwlimit=50k /etc
     Reading index: 1981, done.
-    Saving: 100.00% (998/998k, 1981/1981 files), done.    
-    
+    Saving: 100.00% (998/998k, 1981/1981 files), done.
+
+
+
+    $ ls /home/joe/chroots/httpd
+    bin var
+
+    $ bup index -ux /home/joe/chroots/httpd
+    Indexing: 1337, done.
+
+    $ bup save --strip -n joes-httpd-chroot /home/joe/chroots/httpd
+    Reading index: 1337, done.
+    Saving: 100.00% (998/998k, 1337/1337 files), done.
+
+    $ bup ls joes-httpd-chroot/latest/
+    bin/
+    var/
+
+
+    $ bup save --strip-prefix=/home/joe/chroots -n joes-chroots \
+         /home/joe/chroots/httpd
+    Reading index: 1337, done.
+    Saving: 100.00% (998/998k, 1337/1337 files), done.
+
+    $ bup ls joes-chroots/latest/
+    httpd/
+
+
+    $ bup save --graft /home/joe/chroots/httpd=/http-chroot \
+         -n joe
+         /home/joe/chroots/httpd
+    Reading index: 1337, done.
+    Saving: 100.00% (998/998k, 1337/1337 files), done.
+
+    $ bup ls joe/latest/
+    http-chroot/
+
 
 # SEE ALSO
 
 `bup-index`(1), `bup-split`(1), `bup-on`(1),
-`bup-restore`(1)
+`bup-restore`(1), `ssh_config`(5)
 
 # BUP