GENBACKUPDATA(1) GENBACKUPDATA(1) NAME genbackupdata - generate backup test data SYNOPSIS genbackupdata [options] directory DESCRIPTION genbackupdata generates test data sets for performance testing of backup software. It creates a directory tree filled with files of dif ferent sizes. The total size and the distribution of sizes between small and big are configurable. The program can also modify an exist ing directory tree by creating new files, and deleting, renaming, or modifying existing files. This can be used to generate test data for successive generations of backups. The program is deterministic: with a given set of parameters (and a given pre-existing directory tree), it always creates the same output. This way, it is possible to reproduce backup tests exactly, without having to distribute the potentially very large test sets. The data set consists of plain files and directories. Files are either small text files or big binary files. Text files contain the "lorem ipsum" stanza, binary files contain randomly generated byte streams. The percentage of file data that is small text or big binary files can be set, as can the sizes of the respective file types. Files and directories are named "fileXXXX" or "dirXXXX", where "XXXX" is a successive integer, separate successions for files and directo ries. There is an upper limit to how many files a directory may con tain. After the file limit is reached, a new sub-directory is created. The first set of files go into the root directory of the test set. You have to give one of the options --create, --delete, --rename, or --modify for the program to do anything. You can, however, give more than one of them, if DIR already exists. (Giving the same option more than once means that only the last instance is counted.) (DIR) is cre ated if it doesnt exist already. OPTIONS When giving file sizes (SIZE below), the default unit is a byte. The suffixes "K", "M", "G", and "T" (upper or lower) can be used to refer to kibi-, mebi-, gibi-, and tebibytes, respectively (2 to the power of 10, 20, 30, or 40). When giving file counts (COUNT below), the same suffixes may be used, but then they will refer to kilo-, mega-, giga-, and tera- (10 to the power of 3, 6, 9, or 12). When referring to a size or file count, when it makes sense to give a relative size, the suffix "%" may be used to indicate percentage. Numbers may be integer or floating point (using the locales floating point syntax). --seed=SEED Set the (integer) seed to the psuedo-random number generator. Default: 0. --max-files=COUNT Set the maximum number of files in a directory. Default: 256. -p, --percentage-text-data=PERCENTAGE Set the percentage of file data (not file count) in newly cre ated files (not modified files) allocated to small text files. Default: 10%. -t, --text-file-size=SIZE Set the size of text files. Cannot be a relative size. Default: 10 KiB. -b, --binary-file-size=SIZE Set the size of binary files. Cannot be a relative size. Default: 10 MiB. -c, --create=SIZE Create SIZE amount of new files. A relative amount refers to the size of the pre-existing files. DIR is created if it doesnt exist already. Default: 0. -d, --delete=COUNT Remove COUNT pre-existing files. A relative amount refers to the number of pre-existing files. DIR must exist already. Default: 0. -r, --rename=COUNT Rename COUNT pre-existing files to new names, without changing the contents. A relative amount refers to the number of pre- existing files. DIR must exist already. Default: 0. -l, --link=COUNT Create COUNT links to pre-existing files. -m, --modify=SIZE Modify pre-existing files by appending to them. The new data is divided into text and binary data as for --create, but no regard is given as to whether the file that receives the new data is a text or binary file. Files are picked by random among the pre- existing ones, and the size is increased according to the per centage set by --modify-percentage. A relative SIZE refers to the total size of pre-existing files. DIR must exist already. Default: 0. --modify-percentage=PERCENT Set the number of percent each file is grown when using --mod ify. Note that zero size files are not grown (X% of 0 is always 0). Default: 10%. EXAMPLES Create data for the first generation of a backup: genbackupdata --create=10G testdir Modify an existing set of backup data to create a new generation: genbackupdata -c 5% -d 2% -m 5% -r 0.5% testdir The above command can be run for each new generation. GENBACKUPDATA(1)