.\" Automatically generated by Pandoc 3.10.2 .\" .TH "bup\-save" "1" "2026\-09\-01" "Bup 0.34+" .SH NAME bup\-save \- create a new bup backup set .SH SYNOPSIS 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 \f[CR]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[CR]\-\-name\f[R] (the normal case), or record the tree or commit id printed by \f[CR]\-\-tree\f[R] or \f[CR]\-\-commit\f[R]. .PP Before trying to save files using \f[CR]bup save\f[R], you should first update the index using \f[CR]bup index\f[R]. The reasons for separating the two steps are described in the man page for \f[CR]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[CR]\-\-strip\f[R], \f[CR]\-\-strip\-path\f[R], or \f[CR]\-\-graft\f[R] is specified, metadata will not be saved for the root directory (\f[I]/\f[R]). See \f[CR]bup\-restore\f[R](1) for more information about the handling of metadata. .SH OPTIONS .TP \-r, \-\-remote=[\f[I]user\f[R]\(at]\f[I]host\f[R]:[\f[I]path\f[R]], \-\-remote=URL save the data to the specified remote repository, by default via SSH. See bup(1) REMOTE OPTIONS for further information. .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[CR]$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\(cqt 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\(cqt 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 A directory \f[I]/root/chroot/etc\f[R] saved with \(lqbup 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 A directory \f[I]/root/chroot/webserver/etc\f[R] saved with \(lqbup 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 A directory \f[I]/root/chroot/a/etc\f[R] saved with \(lqbup 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). Defaults to a configured pack.compression or core.compression, or 1 (fast, loose compression). .SH SETTINGS \f[CR]bup save\f[R] honors the \f[CR]bup.split.trees\f[R] configuration option (see \f[CR]bup\-config(5)\f[R]. Note that it must be set in the repository being written to, so for example, in the \f[CR]BUP_DIR\f[R] or \f[CR]\-d\f[R] repository for \f[CR]bup save ...\f[R] without \f[CR]\-r\f[R] and in the the remote repository for \f[CR]bup save \-r ...\f[R]. .SH EXAMPLES .IP .EX $ 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/ .EE .SH SEE ALSO \f[CR]bup\-index\f[R](1), \f[CR]bup\-split\f[R](1), \f[CR]bup\-on\f[R](1), \f[CR]bup\-restore\f[R](1), \f[CR]ssh_config\f[R](5) .SH BUP Part of the \f[CR]bup\f[R](1) suite. .SH AUTHORS Avery Pennarun \c .MT apenwarr@gmail.com .ME \c.