.\" Automatically generated by Pandoc 3.1.3 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "bup-save" "1" "0.33.3" "Bup 0.33.3" "" .hy .SH NAME .PP bup-save - create a new bup backup set .SH SYNOPSIS .PP bup save [-r \f[I]host\f[R]:\f[I]path\f[R]] <-t|-c|-n \f[I]name\f[R]> [-#] [-f \f[I]indexfile\f[R]] [-v] [-q] [--smaller=\f[I]maxsize\f[R]] ; .SH DESCRIPTION .PP \f[V]bup save\f[R] saves the contents of the given files or paths into a new backup set and optionally names that backup set. .PP Note that in order to refer to your backup set later (i.e.\ for restoration), you must either specify \f[V]--name\f[R] (the normal case), or record the tree or commit id printed by \f[V]--tree\f[R] or \f[V]--commit\f[R]. .PP Before trying to save files using \f[V]bup save\f[R], you should first update the index using \f[V]bup index\f[R]. The reasons for separating the two steps are described in the man page for \f[V]bup-index\f[R](1). .PP 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 \f[V]--strip\f[R], \f[V]--strip-path\f[R], or \f[V]--graft\f[R] is specified, metadata will not be saved for the root directory (\f[I]/\f[R]). See \f[V]bup-restore\f[R](1) for more information about the handling of metadata. .SH OPTIONS .TP -r, --remote=\f[I]host\f[R]:\f[I]path\f[R] save the backup set to the given remote server. If \f[I]path\f[R] is omitted, uses the default path on the remote server (you still need to include the `:'). The connection to the remote server is made with SSH. If you\[cq]d like to specify which port, user or private key to use for the SSH connection, we recommend you use the \f[V]\[ti]/.ssh/config\f[R] file. .TP -t, --tree after creating the backup set, print out the git tree id of the resulting backup. .TP -c, --commit after creating the backup set, print out the git commit id of the resulting backup. .TP -n, --name=\f[I]name\f[R] after creating the backup set, create a git branch named \f[I]name\f[R] so that the backup can be accessed using that name. If \f[I]name\f[R] already exists, the new backup will be considered a descendant of the old \f[I]name\f[R]. (Thus, you can continually create new backup sets with the same name, and later view the history of that backup set to see how files have changed over time.) .TP -d, --date=\f[I]date\f[R] specify the date of the backup, in seconds since the epoch, instead of the current time. .TP -f, --indexfile=\f[I]indexfile\f[R] use a different index filename instead of \f[V]$BUP_DIR/bupindex\f[R]. .TP -v, --verbose increase verbosity (can be used more than once). With one -v, prints every directory name as it gets backed up. With two -v, also prints every filename. .TP -q, --quiet disable progress messages. .TP --smaller=\f[I]maxsize\f[R] don\[cq]t back up files >= \f[I]maxsize\f[R] bytes. You can use this to run frequent incremental backups of your small files, which can usually be backed up quickly, and skip over large ones (like virtual machine images) which take longer. Then you can back up the large files less frequently. Use a suffix like k, M, or G to specify multiples of 1024, 1024*1024, 1024*1024*1024 respectively. .TP --bwlimit=\f[I]bytes/sec\f[R] don\[cq]t transmit more than \f[I]bytes/sec\f[R] bytes per second to the server. This is good for making your backups not suck up all your network bandwidth. Use a suffix like k, M, or G to specify multiples of 1024, 1024*1024, 1024*1024*1024 respectively. .TP --strip strips the path that is given from all files and directories. .RS .PP A directory \f[I]/root/chroot/etc\f[R] saved with \[lq]bup save -n chroot --strip /root/chroot\[rq] would be saved as \f[I]/etc\f[R]. Note that currently, metadata will not be saved for the root directory (\f[I]/\f[R]) when this option is specified. .RE .TP --strip-path=\f[I]path-prefix\f[R] strips the given path prefix \f[I]path-prefix\f[R] from all files and directories. .RS .PP A directory \f[I]/root/chroot/webserver/etc\f[R] saved with \[lq]bup save -n webserver --strip-path=/root/chroot /root/chroot/webserver/etc\[rq] would be saved as \f[I]/webserver/etc\f[R]. Note that currently, metadata will not be saved for the root directory (\f[I]/\f[R]) when this option is specified. .RE .TP --graft=\f[I]old_path\f[R]=\f[I]new_path\f[R] a graft point \f[I]old_path\f[R]=\f[I]new_path\f[R] (can be used more than once). .RS .PP A directory \f[I]/root/chroot/a/etc\f[R] saved with \[lq]bup save -n chroot --graft /root/chroot/a=/chroot/a\[rq] would be saved as \f[I]/chroot/a/etc\f[R]. Note that currently, metadata will not be saved for the root directory (\f[I]/\f[R]) when this option is specified. .RE .TP -\f[I]#\f[R], --compress=\f[I]#\f[R] 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) .SH EXAMPLES .IP .nf \f[C] $ 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. $ ls /home/joe/chroot/httpd bin var $ bup index -ux /home/joe/chroot/httpd Indexing: 1337, done. $ bup save --strip -n joes-httpd-chroot /home/joe/chroot/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-path=/home/joe/chroot -n joes-chroot \[rs] /home/joe/chroot/httpd Reading index: 1337, done. Saving: 100.00% (998/998k, 1337/1337 files), done. $ bup ls joes-chroot/latest/ httpd/ $ bup save --graft /home/joe/chroot/httpd=/http-chroot \[rs] -n joe /home/joe/chroot/httpd Reading index: 1337, done. Saving: 100.00% (998/998k, 1337/1337 files), done. $ bup ls joe/latest/ http-chroot/ \f[R] .fi .SH SEE ALSO .PP \f[V]bup-index\f[R](1), \f[V]bup-split\f[R](1), \f[V]bup-on\f[R](1), \f[V]bup-restore\f[R](1), \f[V]ssh_config\f[R](5) .SH BUP .PP Part of the \f[V]bup\f[R](1) suite. .SH AUTHORS Avery Pennarun .