| 1 | #!/usr/local/bin/perl
|
|---|
| 2 |
|
|---|
| 3 | # Name: dbinfo -- identify berkeley DB version used to create
|
|---|
| 4 | # a database file
|
|---|
| 5 | #
|
|---|
| 6 | # Author: Paul Marquess <[email protected]>
|
|---|
| 7 | # Version: 1.05
|
|---|
| 8 | # Date 1sh November 2003
|
|---|
| 9 | #
|
|---|
| 10 | # Copyright (c) 1998-2003 Paul Marquess. All rights reserved.
|
|---|
| 11 | # This program is free software; you can redistribute it and/or
|
|---|
| 12 | # modify it under the same terms as Perl itself.
|
|---|
| 13 |
|
|---|
| 14 | # Todo: Print more stats on a db file, e.g. no of records
|
|---|
| 15 | # add log/txn/lock files
|
|---|
| 16 |
|
|---|
| 17 | use strict ;
|
|---|
| 18 |
|
|---|
| 19 | my %Data =
|
|---|
| 20 | (
|
|---|
| 21 | 0x053162 => {
|
|---|
| 22 | Type => "Btree",
|
|---|
| 23 | Versions =>
|
|---|
| 24 | {
|
|---|
| 25 | 1 => [0, "Unknown (older than 1.71)"],
|
|---|
| 26 | 2 => [0, "Unknown (older than 1.71)"],
|
|---|
| 27 | 3 => [0, "1.71 -> 1.85, 1.86"],
|
|---|
| 28 | 4 => [0, "Unknown"],
|
|---|
| 29 | 5 => [0, "2.0.0 -> 2.3.0"],
|
|---|
| 30 | 6 => [0, "2.3.1 -> 2.7.7"],
|
|---|
| 31 | 7 => [0, "3.0.x"],
|
|---|
| 32 | 8 => [0, "3.1.x -> 4.0.x"],
|
|---|
| 33 | 9 => [1, "4.1.x or greater"],
|
|---|
| 34 | }
|
|---|
| 35 | },
|
|---|
| 36 | 0x061561 => {
|
|---|
| 37 | Type => "Hash",
|
|---|
| 38 | Versions =>
|
|---|
| 39 | {
|
|---|
| 40 | 1 => [0, "Unknown (older than 1.71)"],
|
|---|
| 41 | 2 => [0, "1.71 -> 1.85"],
|
|---|
| 42 | 3 => [0, "1.86"],
|
|---|
| 43 | 4 => [0, "2.0.0 -> 2.1.0"],
|
|---|
| 44 | 5 => [0, "2.2.6 -> 2.7.7"],
|
|---|
| 45 | 6 => [0, "3.0.x"],
|
|---|
| 46 | 7 => [0, "3.1.x -> 4.0.x"],
|
|---|
| 47 | 8 => [1, "4.1.x or greater"],
|
|---|
|
|---|