General Reference : User's Guide : Command Line Interface Utilities : butil
 
butil
Description
The Btrieve utility butil is used at a command prompt for manipulation and administration of Btrieve files and their data. You can use butil to perform the following actions:
Starts and stops continuous operations for use in performing server backups.
Recovers changes made to a file between the time of the last backup and a system failure.
Imports and exports ASCII, unformatted, and SDF sequential data.
Copies data between files.
Preloads or flushes the file page cache.
Returns MicroKernel Engine version information.
Continuous operation is a MicroKernel Engine feature that enables you to back up files while they are in use by Zen-based applications. Two maintenance commands, startbu and endbu, begin and end continuous operation on a file or set of files.
Synopsis
butil
-cache <sourceFile | @listFile>
-CLONE outputFile sourceFile [/O<owner> | /PROMPT] [/pagecompresson | /pagecompressoff] [/recordcompresson | /recordcompressoff] [/UIDuname /PWDpword [/DBdbname]]
-CLROWNER sourceFile /O<owner | /PROMPT> [/UIDuname /PWDpword [/DBdbname]]
@commandFile [commandOutputFile]
-COPY sourceFile outputFile
[/O< owner1 | /PROMPT> [/O<owner2 | /PROMPT>]] [/UIDuname /PWDpword [/DBdbname]]
-CREATE outputFile descriptionFile [< Y | N >] [/UIDuname /PWDpword [/DBdbname]]
-DROP sourceFile < keyNumber | SYSKEY >
[/O<owner> | /PROMPT] [/UIDuname /PWDpword [/DBdbname]]
-ENDBU < /A | sourceFile | @listFile > [/UIDuname /PWDpword [/DBdbname]]
-INDEX sourceFile indexFile descriptionFile
[ /O<owner | /PROMPT>] [/UIDuname /PWDpword [/DBdbname]]
-LOAD unformattedFile outputFile [/O<owner> | /PROMPT] [/UIDuname /PWDpword [/DBdbname]]
-purge <sourceFile | @listFile>
-RECOVER sourceFile unformattedFile [/O<owner |/PROMPT>] [/UIDuname /PWDpword [/DBdbname]]
-ROLLFWD <sourceFile | volume | drive | @listFile>
[</L[dumpFile] | /W[dumpFile]> [/T<dataLength>]
[/E<keyLength>] [/H] [/V] [/O<ownerList | owner> | /PROMPT]]
[/A] [/UIDuname /PWDpword [/DBdbname]]
-SAVE sourceFile unformattedFile
[Y indexFile | N <keyNumber | -1>] [/O<owner1 | /PROMPT>
[/O<owner2 | /PROMPT>]] [/UIDuname /PWDpword [/DBdbname]]
-SETOWNER sourceFile /O<owner | /PROMPT> level [/L][/UIDuname /PWDpword [/DBdbname]]
-SINDEX sourceFile <descriptionFile | SYSKEY> [keyNumber] [/O<owner> | /PROMPT] [/UIDuname /PWDpword [/DBdbname]]
-STARTBU <sourceFile | @listFile> [/UIDuname /PWDpword [/DBdbname]]
-STAT <sourceFile> [/O<owner> | /PROMPT] [/UIDuname /PWDpword [/DBdbname]]
-VER
Note On Linux or macOS distributions, all slash options use a hyphen instead of a slash. For example, the /O options for butil -copy is -O, as in butil -copy -O. Also, if you specify /PROMPT instead of an owner name, upon execution the command generates an interactive prompt for the owner name.
Options
Maintenance tool command options are not case sensitive unless the option is a file name.
If you run butil without specifying a command option or with an invalid command option, a usage message is printed. The usage message indicates that there is an optional /S command line argument to butil. This argument is ignored on Linux, macOS, or Raspbian.
When copying a file requires an owner name for both the original file and the copied file, the -copy option specifies both owner names, as shown in this example:
butil -copy originalFile copiedFile /Od3ltagamm@ /OV3rs10nXIII
The first owner name d3ltagamm@ is required to open originalFile. The second owner name V3rs10nXIII is used to create copiedFile.
If the owner names are provided interactively, the command resembles the following example:
butil -copy originalFile copiedFile /PROMPT /PROMPT
Upon execution, the user is first prompted to enter the owner name to access originalFile. Once that file is open, the user is prompted for the owner name to assign to copiedFile.
Butil also offers an option to execute command files.
For a complete discussion of butil commands, options, and examples, see Btrieve Command Line Maintenance Tool (Butil) in Advanced Operations Guide.
See Also
syslogd in Linux or macOS man pages
Btrieve API Guide, which describes the API for the MicroKernel Engine.