.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "bup-split" "1" "2021-02-06" "Bup 0.32" "" .hy .SH NAME .PP bup-split - save individual files to bup backup sets .SH SYNOPSIS .PP bup split [-t] [-c] [-n \f[I]name\f[R]] COMMON_OPTIONS .PP bup split -b COMMON_OPTIONS .PP bup split \[en]copy COMMON_OPTIONS .PP bup split \[en]noop [-t|-b] COMMON_OPTIONS .TP COMMON_OPTIONS [-r \f[I]host\f[R]:\f[I]path\f[R]] [-v] [-q] [-d \f[I]seconds-since-epoch\f[R]] [--bench] [--max-pack-size=\f[I]bytes\f[R]] [-#] [--bwlimit=\f[I]bytes\f[R]] [--max-pack-objects=\f[I]n\f[R]] [--fanout=\f[I]count\f[R]] [--keep-boundaries] [--git-ids | filenames\&...] .SH DESCRIPTION .PP \f[C]bup split\f[R] concatenates the contents of the given files (or if no filenames are given, reads from stdin), splits the content into chunks of around 8k using a rolling checksum algorithm, and saves the chunks into a bup repository. Chunks which have previously been stored are not stored again (ie. they are `deduplicated'). .PP Because of the way the rolling checksum works, chunks tend to be very stable across changes to a given file, including adding, deleting, and changing bytes. .PP For example, if you use \f[C]bup split\f[R] to back up an XML dump of a database, and the XML file changes slightly from one run to the next, nearly all the data will still be deduplicated and the size of each backup after the first will typically be quite small. .PP Another technique is to pipe the output of the \f[C]tar\f[R](1) or \f[C]cpio\f[R](1) programs to \f[C]bup split\f[R]. When individual files in the tarball change slightly or are added or removed, bup still processes the remainder of the tarball efficiently. (Note that \f[C]bup save\f[R] is usually a more efficient way to accomplish this, however.) .PP To get the data back, use \f[C]bup-join\f[R](1). .SH MODES .PP These options select the primary behavior of the command, with -n being the most likely choice. .TP -n, --name=\f[I]name\f[R] after creating the dataset, create a git branch named \f[I]name\f[R] so that it can be accessed using that name. If \f[I]name\f[R] already exists, the new dataset will be considered a descendant of the old \f[I]name\f[R]. (Thus, you can continually create new datasets with the same name, and later view the history of that dataset to see how it has changed over time.) The original data will also be available as a top-level file named \[lq]data\[rq] in the VFS, accessible via \f[C]bup fuse\f[R], \f[C]bup ftp\f[R], etc. .TP -t, --tree output the git tree id of the resulting dataset. .TP -c, --commit output the git commit id of the resulting dataset. .TP -b, --blobs output a series of git blob ids that correspond to the chunks in the dataset. Incompatible with -n, -t, and -c. .TP --noop read the data and split it into blocks based on the \[lq]bupsplit\[rq] rolling checksum algorithm, but don\[cq]t store anything in the repo. Can be combined with -b or -t to compute (but not store) the git blobs or tree ids for the dataset. This is mostly useful for benchmarking and validating the bupsplit algorithm. Incompatible with -n and -c. .TP --copy like \f[C]--noop\f[R], but also write the data to stdout. This can be useful for benchmarking the speed of read+bupsplit+write for large amounts of data. Incompatible with -n, -t, -c, and -b. .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[C]\[ti]/.ssh/config\f[R] file. Even though the destination is remote, a local bup repository is still required. .TP -d, --date=\f[I]seconds-since-epoch\f[R] specify the date inscribed in the commit (seconds since 1970-01-01). .TP -q, --quiet disable progress messages. .TP -v, --verbose increase verbosity (can be used more than once). .TP --git-ids stdin is a list of git object ids instead of raw data. \f[C]bup split\f[R] will read the contents of each named git object (if it exists in the bup repository) and split it. This might be useful for converting a git repository with large binary files to use bup-style hashsplitting instead. This option is probably most useful when combined with \f[C]--keep-boundaries\f[R]. .TP --keep-boundaries if multiple filenames are given on the command line, they are normally concatenated together as if the content all came from a single file. That is, the set of blobs/trees produced is identical to what it would have been if there had been a single input file. However, if you use \f[C]--keep-boundaries\f[R], each file is split separately. You still only get a single tree or commit or series of blobs, but each blob comes from only one of the files; the end of one of the input files always ends a blob. .TP --bench print benchmark timings to stderr. .TP --max-pack-size=\f[I]bytes\f[R] never create git packfiles larger than the given number of bytes. Default is 1 billion bytes. Usually there is no reason to change this. .TP --max-pack-objects=\f[I]numobjs\f[R] never create git packfiles with more than the given number of objects. Default is 200 thousand objects. Usually there is no reason to change this. .TP --fanout=\f[I]numobjs\f[R] when splitting very large files, try and keep the number of elements in trees to an average of \f[I]numobjs\f[R]. .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 -\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] $ tar -cf - /etc | bup split -r myserver: -n mybackup-tar tar: Removing leading /\[aq] from member names Indexing objects: 100% (196/196), done. $ bup join -r myserver: mybackup-tar | tar -tf - | wc -l 1961 \f[R] .fi .SH SEE ALSO .PP \f[C]bup-join\f[R](1), \f[C]bup-index\f[R](1), \f[C]bup-save\f[R](1), \f[C]bup-on\f[R](1), \f[C]ssh_config\f[R](5) .SH BUP .PP Part of the \f[C]bup\f[R](1) suite. .SH AUTHORS Avery Pennarun .