5 moglistkeys -- Lists keys out of a MogileFS domain
9 $ moglistkeys --trackers=host --domain=foo --key_prefix="/foo/bar/"
13 If you store your MogileFS keys in a logical "structure", you may use this
14 tool to view lists of subsets of keys. Note that this is not going to be
15 equivalent to "cd" and "ls" tools, as listing "foo/" will list everything
16 underneath, so it's more akin to "ls -R"
22 =item --trackers=host1:7001,host2:7001
24 Use these MogileFS trackers to negotiate with.
26 =item --domain=<domain>
28 Set the MogileFS domain to use.
30 =item --key_prefix="/foo/bar/"
32 Search for keys starting with this prefix. Can be an arbitrary string.
38 Dormando E<lt>L<dormando@rydia.net>E<gt>
46 Licensed for use and redistribution under the same terms as Perl itself.
50 # TODO: Add ways to limit # of keys displayed
58 my $util = MogileFS
::Utils
->new;
59 my $usage = "--trackers=host --domain=foo --key_prefix='bar/'";
60 my $c = $util->getopts($usage, 'key_prefix=s');
62 my $mogc = $util->client;
64 $mogc->foreach_key(prefix
=> $c->{key_prefix
}, sub {
70 die "Error listing files: ", $mogc->errstr, "\n";