bk bam(7.3ce) BitKeeper User's Manual bk bam(7.3ce) NAME bk bam - BAM utility routines SYNOPSIS bk bam check [-Fq] bk bam clean [-an] bk bam convert [<size>] bk bam pull [-aq] [<URL>] bk bam push [-q] [<URL>] bk bam reattach [-q] <-> bk bam reload bk bam repair [-q] [-@<URL>] bk bam server [-flqrs] [<URL>] DESCRIPTION BitKeeper Binary Asset Management (BAM) is a subfeature that provides support for large binary files, such as tool chains, cell libraries, game data, etc. BAM differs from traditional binary storage in that the data does not need to be replicated in all clones, it may be lazily fetched on demand from a BAM server. The bk bam command is a utility command which provides interfaces for checking integrity of BAM files, removing "orphaned" BAM files, con- verting old binary files to BAM files, fetching BAM files from the BAM server, pushing local BAM files to the BAM server, or repairing a BAM pool. In general, the convert or pull interfaces are most likely to be useful, the others are typically used debugging. In any operation with a "-q" option, that option means to run quietly. The operations supported are: check Check that the BAM files are present and are not corrupted. If the "-F" option is included, then the corruption check is skipped. Any files which are not found locally are looked for in the BAM server. Note: currently there is no way to check for corruption remotely. clean Remove any BAM files that are not referenced by any delta in the repository. If the "-a" option is included, then flush local BAM files which are copies from the BAM server. If the "-n" option is included, then just say what would be done but do not do it. NOTE: this command should never be run in a BAM server since the server may have BAM files referenced only by clients. convert Convert all files from traditional binary encoding to BAM encoding. Only files greater than a certain size are con- verted since small files perform better with the traditional encoding. The size, which defaults to 64K, is compared against the initial version of each binary file, and if that version is greater than the size the file is converted. Note that the conversion may be run more than once, but the size used can only decrease, it may not increase. pull This interface is used to transfer any BAM data that is miss- ing from the current repository or its BAM server. This is useful to request any missing BAM data after switching to a new BAM server. With the -a option the local BAM server is ignored, so all BAM data will be requested. Normally, the local BAM pool contains only those files which have been either checked out locally or created locally, i.e., the BAM pool is sparse. This command may be useful to populate a lap- top clone with all revisions for disconnected operation or to set up a new BAM server. push This interface is used to populate a BAM server with any BAM files which have been created locally but not sent to the server. In general, this command is not needed because the BAM server is automatically updated if the local BAM files are either cloned or pulled to another repo. reattach Used to try and reinsert data into the BAM directory. If your disk crashed and some files were lost from the BAM directory (which bk bam check -F will tell you) and you believe you have that data, you can tell bk bam reattach to put it back. For each file specified on standard input, see if the hash of the file matches one of the missing files. If so, reinsert that file. reload The BAM pool has an on disk binary index that is used for fast lookups stored in: BitKeeper/BAM/<repo-rootkey>/index.db The data is also stored in a text format index: BitKeeper/BAM/<repo-rootkey>/BAM.index Should the binary index get corrupted, it may be recreated running this command. repair Similar to bk bam check except that it will attempt to repair any corrupted data. By default, it will look for good data in the BAM server, but you may specify a different location with [-@<URL>] (which may be repeated). server Used to report or, with the optional <URL>, set the BAM server from which BAM data will be fetched. If the "-r" option is set then the current server URL is deleted. When the BAM server is changed, this command will automatically query the new server and transfer any BAM data it is missing from the old BAM server. This query and transfer may be suppressed with the "-s" option. Use the "-f" option to force changing or removing the BAM server setting if the repository is cur- rently defined as a BAM server. The "-l" option causes the existing BAM server URL to be printed for scripts. And "-q" can be used to suppress status messages when the URL is changed. SEE ALSO bk Howto-BAM CATEGORY Utility BitKeeper Inc 1D1 bk bam(7.3ce)