1bup-save(1)                                                        bup-save(1)
2
3
4

NAME

6       bup-save - create a new bup backup set
7

SYNOPSIS

9       bup  save  [-r host:path] <-t|-c|-n name> [-#] [-f indexfile] [-v] [-q]
10       [--smaller=maxsize] <paths...>;
11

DESCRIPTION

13       bup save saves the contents of the given files  or  paths  into  a  new
14       backup set and optionally names that backup set.
15
16       Note that in order to refer to your backup set later (i.e. for restora‐
17       tion), you must either specify --name (the normal case), or record  the
18       tree or commit id printed by --tree or --commit.
19
20       Before trying to save files using bup save, you should first update the
21       index using bup index.  The reasons for separating the  two  steps  are
22       described in the man page for bup-index(1).
23
24       By default, metadata will be saved for every path, and the metadata for
25       any unindexed parent directories of indexed paths will be taken direct‐
26       ly  from the filesystem.  However, if --strip, --strip-path, or --graft
27       is specified, metadata will not be saved for the  root  directory  (/).
28       See bup-restore(1) for more information about the handling of metadata.
29

OPTIONS

31       -r, --remote=host:path
32              save  the  backup  set  to  the given remote server.  If path is
33              omitted, uses the default path on the remote server  (you  still
34              need  to  include the `:').  The connection to the remote server
35              is made with SSH.  If you'd like to specify which port, user  or
36              private  key to use for the SSH connection, we recommend you use
37              the ~/.ssh/config file.
38
39       -t, --tree
40              after creating the backup set, print out the git tree id of  the
41              resulting backup.
42
43       -c, --commit
44              after  creating  the  backup set, print out the git commit id of
45              the resulting backup.
46
47       -n, --name=name
48              after creating the backup set, create a git branch named name so
49              that  the  backup  can be accessed using that name.  If name al‐
50              ready exists, the new backup will be considered a descendant  of
51              the old name.  (Thus, you can continually create new backup sets
52              with the same name, and later view the history  of  that  backup
53              set to see how files have changed over time.)
54
55       -d, --date=date
56              specify  the date of the backup, in seconds since the epoch, in‐
57              stead of the current time.
58
59       -f, --indexfile=indexfile
60              use a different index filename instead of $BUP_DIR/bupindex.
61
62       -v, --verbose
63              increase verbosity (can be used more than once).  With  one  -v,
64              prints  every directory name as it gets backed up.  With two -v,
65              also prints every filename.
66
67       -q, --quiet
68              disable progress messages.
69
70       --smaller=maxsize
71              don't back up files >= maxsize bytes.  You can use this  to  run
72              frequent incremental backups of your small files, which can usu‐
73              ally be backed up quickly, and skip over large ones (like virtu‐
74              al  machine images) which take longer.  Then you can back up the
75              large files less frequently.  Use a suffix like k, M,  or  G  to
76              specify multiples of 1024, 10241024, 10241024*1024 respectively.
77
78       --bwlimit=bytes/sec
79              don't transmit more than bytes/sec bytes per second to the serv‐
80              er.  This is good for making your backups not suck up  all  your
81              network bandwidth.  Use a suffix like k, M, or G to specify mul‐
82              tiples of 1024, 10241024, 10241024*1024 respectively.
83
84       --strip
85              strips the path that is given from all files and directories.
86
87              A directory /root/chroot/etc saved  with  “bup  save  -n  chroot
88              --strip  /root/chroot”  would  be saved as /etc.  Note that cur‐
89              rently, metadata will not be saved for the  root  directory  (/)
90              when this option is specified.
91
92       --strip-path=path-prefix
93              strips  the given path prefix path-prefix from all files and di‐
94              rectories.
95
96              A directory /root/chroot/webserver saved with “bup save -n  web‐
97              server  --strip-path=/root/chroot”  would  be saved as /webserv‐
98              er/etc.  Note that currently, metadata will not be saved for the
99              root directory (/) when this option is specified.
100
101       --graft=old_path=new_path
102              a graft point old_path=new_path (can be used more than once).
103
104              A  directory  /root/chroot/a/etc  saved with “bup save -n chroot
105              --graft  /root/chroot/a=/chroot/a”  would  be  saved   as   /ch‐
106              root/a/etc.  Note that currently, metadata will not be saved for
107              the root directory (/) when this option is specified.
108
109       -#, --compress=#
110              set the compression level to # (a value from 0-9, where 9 is the
111              highest and 0 is no compression).  The default is 1 (fast, loose
112              compression)
113

EXAMPLES

115              $ bup index -ux /etc
116              Indexing: 1981, done.
117
118              $ bup save -r myserver: -n my-pc-backup --bwlimit=50k /etc
119              Reading index: 1981, done.
120              Saving: 100.00% (998/998k, 1981/1981 files), done.
121
122
123
124              $ ls /home/joe/chroot/httpd
125              bin var
126
127              $ bup index -ux /home/joe/chroot/httpd
128              Indexing: 1337, done.
129
130              $ bup save --strip -n joes-httpd-chroot /home/joe/chroot/httpd
131              Reading index: 1337, done.
132              Saving: 100.00% (998/998k, 1337/1337 files), done.
133
134              $ bup ls joes-httpd-chroot/latest/
135              bin/
136              var/
137
138
139              $ bup save --strip-path=/home/joe/chroot -n joes-chroot \
140                   /home/joe/chroot/httpd
141              Reading index: 1337, done.
142              Saving: 100.00% (998/998k, 1337/1337 files), done.
143
144              $ bup ls joes-chroot/latest/
145              httpd/
146
147
148              $ bup save --graft /home/joe/chroot/httpd=/http-chroot \
149                   -n joe
150                   /home/joe/chroot/httpd
151              Reading index: 1337, done.
152              Saving: 100.00% (998/998k, 1337/1337 files), done.
153
154              $ bup ls joe/latest/
155              http-chroot/
156

SEE ALSO

158       bup-index(1), bup-split(1), bup-on(1), bup-restore(1), ssh_config(5)
159

BUP

161       Part of the bup(1) suite.
162

AUTHORS

164       Avery Pennarun <apenwarr@gmail.com>.
165
166
167
168Bup 0.29.2                        2018-10-20                       bup-save(1)
Impressum