1 % bup-save(1) Bup %BUP_VERSION%
2 % Avery Pennarun <apenwarr@gmail.com>
7 bup-save - create a new bup backup set
11 bup save [-r *host*:*path*] \<-t|-c|-n *name*\> [-#] [-f *indexfile*]
12 [-v] [-q] [\--smaller=*maxsize*] \<paths...\>;
16 `bup save` saves the contents of the given files or paths
17 into a new backup set and optionally names that backup set.
19 Before trying to save files using `bup save`, you should
20 first update the index using `bup index`. The reasons
21 for separating the two steps are described in the man page
24 By default, metadata will be saved for every path. However, if
25 `--strip`, `--strip-path`, or `--graft` is specified, metadata will
26 not be saved for the root directory (*/*).
30 -r, \--remote=*host*:*path*
31 : save the backup set to the given remote server. If
32 *path* is omitted, uses the default path on the remote
33 server (you still need to include the ':'). The connection to the
34 remote server is made with SSH. If you'd like to specify which port, user
35 or private key to use for the SSH connection, we recommend you use the
39 : after creating the backup set, print out the git tree
40 id of the resulting backup.
43 : after creating the backup set, print out the git commit
44 id of the resulting backup.
47 : after creating the backup set, create a git branch
48 named *name* so that the backup can be accessed using
49 that name. If *name* already exists, the new backup
50 will be considered a descendant of the old *name*.
51 (Thus, you can continually create new backup sets with
52 the same name, and later view the history of that
53 backup set to see how files have changed over time.)
56 : specify the date of the backup, in seconds since the epoch, instead
59 -f, \--indexfile=*indexfile*
60 : use a different index filename instead of
64 : increase verbosity (can be used more than once). With
65 one -v, prints every directory name as it gets backed up. With
66 two -v, also prints every filename.
69 : disable progress messages.
72 : don't back up files >= *maxsize* bytes. You can use
73 this to run frequent incremental backups of your small
74 files, which can usually be backed up quickly, and skip
75 over large ones (like virtual machine images) which
76 take longer. Then you can back up the large files
77 less frequently. Use a suffix like k, M, or G to
78 specify multiples of 1024, 1024*1024, 1024*1024*1024
81 \--bwlimit=*bytes/sec*
82 : don't transmit more than *bytes/sec* bytes per second
83 to the server. This is good for making your backups
84 not suck up all your network bandwidth. Use a suffix
85 like k, M, or G to specify multiples of 1024,
86 1024*1024, 1024*1024*1024 respectively.
89 : strips the path that is given from all files and directories.
91 A directory */root/chroot/etc* saved with "bup save -n chroot
92 \--strip /root/chroot" would be saved as */etc*. Note that
93 currently, metadata will not be saved for the root directory (*/*)
94 when this option is specified.
96 \--strip-path=*path-prefix*
97 : strips the given path prefix *path-prefix* from all
98 files and directories.
100 A directory */root/chroots/webserver* saved with "bup save -n
101 webserver \--strip-path=/root/chroots" would be saved as
102 */webserver/etc*. Note that currently, metadata will not be saved
103 for the root directory (*/*) when this option is specified.
105 \--graft=*old_path*=*new_path*
106 : a graft point *old_path*=*new_path* (can be used more than
109 A directory */root/chroot/a/etc* saved with "bup save -n chroots
110 \--graft /root/chroot/a/etc=/chroots/a" would be saved as
111 */chroots/a/etc*. Note that currently, metadata will not be saved
112 for the root directory (*/*) when this option is specified.
114 -*#*, \--compress=*#*
115 : set the compression level to # (a value from 0-9, where
116 9 is the highest and 0 is no compression). The default
117 is 1 (fast, loose compression)
123 Indexing: 1981, done.
125 $ bup save -r myserver: -n my-pc-backup --bwlimit=50k /etc
126 Reading index: 1981, done.
127 Saving: 100.00% (998/998k, 1981/1981 files), done.
131 $ ls /home/joe/chroots/httpd
134 $ bup index -ux /home/joe/chroots/httpd
135 Indexing: 1337, done.
137 $ bup save --strip -n joes-httpd-chroot /home/joe/chroots/httpd
138 Reading index: 1337, done.
139 Saving: 100.00% (998/998k, 1337/1337 files), done.
141 $ bup ls joes-httpd-chroot/latest/
146 $ bup save --strip-path=/home/joe/chroots -n joes-chroots \
147 /home/joe/chroots/httpd
148 Reading index: 1337, done.
149 Saving: 100.00% (998/998k, 1337/1337 files), done.
151 $ bup ls joes-chroots/latest/
155 $ bup save --graft /home/joe/chroots/httpd=/http-chroot \
157 /home/joe/chroots/httpd
158 Reading index: 1337, done.
159 Saving: 100.00% (998/998k, 1337/1337 files), done.
167 `bup-index`(1), `bup-split`(1), `bup-on`(1),
168 `bup-restore`(1), `ssh_config`(5)
172 Part of the `bup`(1) suite.