1 .\" Hey, EMACS: -*- nroff -*-
2 .\" First parameter, NAME, should be all caps
3 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
4 .\" other parameters are allowed: see man(7), man(1)
5 .TH BIO 1 "May 17, 2011"
6 .\" Please adjust this date whenever revising the manpage.
8 .\" Some roff macros, for reference:
9 .\" .nh disable hyphenation
10 .\" .hy enable hyphenation
11 .\" .ad l left justify
12 .\" .ad b justify to both left and right margins
13 .\" .nf disable filling
14 .\" .fi enable filling
15 .\" .br insert line break
16 .\" .sp <n> insert n+1 empty lines
17 .\" for manpage-specific macros, see man(7)
20 \- Barry Input / Output
22 .B bio -i <input type> [input args] -o <output type> [output args] [-o <output type> ...]
26 is a command line tool that treats devices, backups, and data streams
29 supports the following types of IO (actual type name shown in bold):
38 (serialization files and streams)
46 human readable and hex text
53 for extracting Content Store records
56 Each command line consists of at least one input and output option,
57 along with their switches. More than one output can be used, as long
58 as they do not conflict with each other. For example, it is not possible
59 to read and write from the same device PIN.
62 This tool combines a lot of the functionality of
63 .B btool, btardump, brecsum,
66 but does it more flexibly, and improves functionality in some cases,
67 such as Boost archives being able to contain more than one database.
69 .SH DEVICE TYPE OPTIONS
73 type is used to read or write from a device connected via USB.
74 Some of the options below are valid only in one input or output
78 Name of database to load, when using the
80 type as input. Can be used multiple times. See
82 for a list of databases on the device.
85 Selects all databases found on the device, instead of adding them
86 manually via the \-d option.
89 PIN of device to talk to. Valid for both input and output.
90 Only needed if you have more than one Blackberry connected at once.
93 Simplistic method to specify device password. In a real application, this
94 would be done using a more secure prompt.
97 Set write mode when using the
99 type in output mode. This must be specified, or nothing will be written.
101 .B erase, overwrite, addonly, addnew.
105 Erases all records from existing database and adds all new records to the
106 device, using their Unique IDs, if available. This is what you would normally
107 use to restore a backup.
110 Adds any new records, and for records with Unique IDs that already exist
111 on the device, overwrite them.
114 Adds any new records, but if a record exists in the device with the same
115 Unique ID, skip that record and don't write it to the device.
118 Adds all incoming records as brand new records, generating a new Unique ID
119 for each one, and leaving any existing records intact. This may cause
120 data duplication if you're restoring data that initially came from this
121 same device. Use this for copying data from another device, while keeping
122 your existing records.
126 .\".SH DATABASE COMMAND MODIFIERS (DEVICE)
127 .\"The following options modify the -d command option above, and can be used
128 .\"multiple times for more than one record.
131 .\"Fetch specific record, given a record index number as seen in the -T state table.
132 .\"Can be used multiple times to fetch specific records from a single database.
135 .\"Same as -r, but also clears the record's dirty flags.
138 .\"Delete the specified record using the index number as seen in the -T state table.
144 type is used to read or write from a backup file created by btool or
148 Name of database to load, when using the
150 type as input. Can be used multiple times.
152 that if no \-d options are specified,
154 defaults to reading all available databases.
157 The tar backup file to read or write from.
159 uses gzip compressed tar files, so suitable extensions would be .tgz
160 and .tar.gz. Unfortunately, due to internal limitations,
161 an actual file must be specified here, and not \- for stdin / stdout.
163 .SH BOOST TYPE OPTIONS
167 type is used to read and write parsable records in Boost Serialization
168 format. These files were historically written and read by
173 is more flexible, in that it can contain multiple databases in one
174 serialization archive.
177 Filename to read from or write to. Use \- to specify stdin or stdout.
178 If not specified for input, defaults to stdin, but since output can
179 contain non-ASCII chars, you must use \-f \- if you want to write
182 .SH LDIF TYPE OPTIONS
186 type is used to read or write ldif output, like the output of the
187 LDAP command line tool
191 When using ldif as output, specify the base DN.
194 Again, for output, specify the attribute name to use when building the FQDN.
196 .SH MIME TYPE OPTIONS
200 type is used to read or write VCARD, VEVENT, VTODO, or VJOURNAL records
201 based on the Address Book, Calendar, Tasks, or Memos databases respectively.
204 Filename to read from or write to. Defaults to \- for stdin or stdout.
206 .SH DUMP TYPE OPTIONS
210 type is used only for output, and sends human readable record data to
211 stdout. Parsable records are parsed; unknown records are dumped in hex
215 Use hex format for all records.
217 .SH SHA1 TYPE OPTIONS
221 type is used to mimic the behaviour of the
223 command. It calculates a SHA1 sum on the raw record data and sends
227 Include the DB Name, Type, and Unique record ID in the checksum for each
230 .SH CSTORE TYPE OPTIONS
234 type is used to parse Content Store records.
237 List the filenames and folders found in the Content Store database.
240 Select a filename from the above list to extract and save locally.
241 Specify the entire path as shown in the \-l list.
242 If the file is found in the device, it will be written to the current
243 directory, using the base filename as the name. If a file by that name
244 exists already, the filename will be modified to avoid overwriting local
247 .SH STANDALONE OPTIONS
250 Displays a detailed summary of command line options.
253 Set the international charset for string conversions. Valid values here
258 Show list of supported database parsers and builders.
261 Dump verbose low level protocol data during USB operations, to stdout.
268 1) Backup a full device to tar backup:
270 bio -i device -A -o tar -f mybackup.tar.gz
272 2) Read a backup file and convert the Address Book to MIME
274 bio -i tar -f mybackup.tar.gz -d "Address Book" -o mime
276 3) Restore a single database to a device
278 bio -i tar -f mybackup.tar.gz -d "Address Book" -o device -w erase
280 4) Copy the Calendar from one device to another, and dump
281 the records to stdout in human readable format at the same time
283 bio -i device -p 3009efe3 -d Calendar -o device -p 204062f3 -w erase -o dump
285 5) Read LDIF input and convert the contacts to MIME format
287 ldapsearch -x | bio -i ldif -o mime
289 6) Test the record code by running the Tasks database through
290 the Boost storage and back to human readable
292 bio -i device -d Tasks -o dump
296 bio -i device -d Tasks -o boost -f - | bio -i boost -f - -o dump
301 is part of the Barry project.
304 http://www.netdirect.ca/barry