Changeset 16179
- Timestamp:
- Jan 22, 2008, 11:14:55 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
Nebulous-Server/bin/neb-addvol (modified) (8 diffs)
-
Nebulous/bin/neb-addvol (modified) (8 diffs)
-
Nebulous/bin/neb-cp (modified) (6 diffs)
-
Nebulous/bin/neb-locate (modified) (4 diffs)
-
Nebulous/bin/neb-touch (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server/bin/neb-addvol
r13074 r16179 1 1 #!/usr/bin/env perl 2 2 3 # Copyright (C) 2005-200 7Joshua Hoblitt3 # Copyright (C) 2005-2008 Joshua Hoblitt 4 4 # 5 # $Id: neb-addvol,v 1. 5 2007-04-28 01:19:59jhoblitt Exp $5 # $Id: neb-addvol,v 1.6 2008-01-22 21:14:55 jhoblitt Exp $ 6 6 7 7 use strict; … … 18 18 use Pod::Usage qw( pod2usage ); 19 19 20 my ($db, $dbuser, $dbpass, $ name, $uri);20 my ($db, $dbuser, $dbpass, $volume, $uri); 21 21 22 22 $db = $ENV{'NEB_DB'} unless $db; … … 28 28 'user=s' => \$dbuser, 29 29 'pass=s' => \$dbpass, 30 ' name=s' => \$name,30 'volume=s' => \$volume, 31 31 'uri=s' => \$uri, 32 32 ) || pod2usage( 2 ); … … 34 34 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 35 35 pod2usage( -msg => "Required options: --db --user --pass", -exitval => 2 ) 36 unless $db && $dbuser && $dbpass && $ name && $uri;36 unless $db && $dbuser && $dbpass && $volume && $uri; 37 37 38 38 my $dbh = DBI->connect( … … 61 61 62 62 my $query = $dbh->prepare( $sql->new_volume ); 63 $query->execute( $ name, $path );63 $query->execute( $volume, $path ); 64 64 65 65 print " OK\n"; … … 75 75 =head1 SYNOPSIS 76 76 77 neb-addvol --name <volume name> --uri <volume uri> [--db <database>] [--user <username>] [--pass <password>] 77 neb-addvol --volume <volume name> --uri <volume uri> 78 [--db <database>] [--user <username>] [--pass <password>] 78 79 79 80 =head1 DESCRIPTION … … 87 88 =over 4 88 89 89 =item * -- name|-n <volume name>90 =item * --volume|-n <volume name> 90 91 91 92 Symbolic name of volume being added. … … 151 152 =head1 COPYRIGHT 152 153 153 Copyright (C) 2005-200 7Joshua Hoblitt. All rights reserved.154 Copyright (C) 2005-2008 Joshua Hoblitt. All rights reserved. 154 155 155 156 This program is free software; you can redistribute it and/or modify it under -
trunk/Nebulous/bin/neb-addvol
r13074 r16179 1 1 #!/usr/bin/env perl 2 2 3 # Copyright (C) 2005-200 7Joshua Hoblitt3 # Copyright (C) 2005-2008 Joshua Hoblitt 4 4 # 5 # $Id: neb-addvol,v 1. 5 2007-04-28 01:19:59jhoblitt Exp $5 # $Id: neb-addvol,v 1.6 2008-01-22 21:14:55 jhoblitt Exp $ 6 6 7 7 use strict; … … 18 18 use Pod::Usage qw( pod2usage ); 19 19 20 my ($db, $dbuser, $dbpass, $ name, $uri);20 my ($db, $dbuser, $dbpass, $volume, $uri); 21 21 22 22 $db = $ENV{'NEB_DB'} unless $db; … … 28 28 'user=s' => \$dbuser, 29 29 'pass=s' => \$dbpass, 30 ' name=s' => \$name,30 'volume=s' => \$volume, 31 31 'uri=s' => \$uri, 32 32 ) || pod2usage( 2 ); … … 34 34 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 35 35 pod2usage( -msg => "Required options: --db --user --pass", -exitval => 2 ) 36 unless $db && $dbuser && $dbpass && $ name && $uri;36 unless $db && $dbuser && $dbpass && $volume && $uri; 37 37 38 38 my $dbh = DBI->connect( … … 61 61 62 62 my $query = $dbh->prepare( $sql->new_volume ); 63 $query->execute( $ name, $path );63 $query->execute( $volume, $path ); 64 64 65 65 print " OK\n"; … … 75 75 =head1 SYNOPSIS 76 76 77 neb-addvol --name <volume name> --uri <volume uri> [--db <database>] [--user <username>] [--pass <password>] 77 neb-addvol --volume <volume name> --uri <volume uri> 78 [--db <database>] [--user <username>] [--pass <password>] 78 79 79 80 =head1 DESCRIPTION … … 87 88 =over 4 88 89 89 =item * -- name|-n <volume name>90 =item * --volume|-n <volume name> 90 91 91 92 Symbolic name of volume being added. … … 151 152 =head1 COPYRIGHT 152 153 153 Copyright (C) 2005-200 7Joshua Hoblitt. All rights reserved.154 Copyright (C) 2005-2008 Joshua Hoblitt. All rights reserved. 154 155 155 156 This program is free software; you can redistribute it and/or modify it under -
trunk/Nebulous/bin/neb-cp
r13075 r16179 1 1 #!/usr/bin/env perl 2 2 3 # Copyright (C) 2007 Joshua Hoblitt3 # Copyright (C) 2007-2008 Joshua Hoblitt 4 4 # 5 # $Id: neb-cp,v 1. 3 2007-04-28 01:24:26jhoblitt Exp $5 # $Id: neb-cp,v 1.4 2008-01-22 21:14:55 jhoblitt Exp $ 6 6 7 7 use strict; … … 16 16 use Pod::Usage qw( pod2usage ); 17 17 18 my ($ node, $server);18 my ($volume, $server); 19 19 20 20 $server = $ENV{'NEB_SERVER'} unless $server; 21 21 22 22 GetOptions( 23 ' node|n=s' => \$node,23 'volume|v=s' => \$volume, 24 24 'server|s=s' => \$server, 25 25 ) || pod2usage( 2 ); … … 41 41 42 42 my $status; 43 if ($ node) {44 $status = $neb->copy( $src, $dst, $ node);43 if ($volume) { 44 $status = $neb->copy( $src, $dst, $volume); 45 45 } else { 46 46 $status = $neb->copy( $src, $dst); … … 59 59 =head1 SYNOPSIS 60 60 61 neb-cp [--server <URL>] [-- node <dst volume>] <src key> <dst key>61 neb-cp [--server <URL>] [--volume <dst volume name>] <src key> <dst key> 62 62 63 63 =head1 DESCRIPTION 64 64 65 This program list Nebulous keys matched by C<<pattern>>. Call it with no 66 arguments is equivalanet to searching with the pattern C<.*>. Where 67 C<<pattern>> is a POSIX 1003.2 compatable regular repression. 65 Copy a Nebulous storage key 68 66 69 67 =head1 OPTIONS … … 76 74 77 75 Optional if the appropriate environment variable is set. 76 77 =item * -volume|-v <volume name> 78 79 The volume to place the new key's first storage instance on. 80 81 Optional. 78 82 79 83 =back … … 107 111 =head1 COPYRIGHT 108 112 109 Copyright (C) 2007 Joshua Hoblitt. All rights reserved.113 Copyright (C) 2007-2008 Joshua Hoblitt. All rights reserved. 110 114 111 115 This program is free software; you can redistribute it and/or modify it under -
trunk/Nebulous/bin/neb-locate
r13258 r16179 1 1 #!/usr/bin/env perl 2 2 3 # Copyright (C) 2007 Joshua Hoblitt3 # Copyright (C) 2007-2008 Joshua Hoblitt 4 4 # 5 # $Id: neb-locate,v 1. 2 2007-05-05 00:29:43jhoblitt Exp $5 # $Id: neb-locate,v 1.3 2008-01-22 21:14:55 jhoblitt Exp $ 6 6 7 7 use strict; … … 82 82 =head1 SYNOPSIS 83 83 84 neb-locate [--server <URL>] [--volume < name>] [--all] [--path] <key>84 neb-locate [--server <URL>] [--volume <volume name>] [--all] [--path] <key> 85 85 86 86 =head1 DESCRIPTION … … 111 111 Optional if the appropriate environment variable is set. 112 112 113 =item * --volume < name>113 =item * --volume <volume name> 114 114 115 115 Restrict search for instances to this Nebulous volume. … … 147 147 =head1 COPYRIGHT 148 148 149 Copyright (C) 2007 Joshua Hoblitt. All rights reserved.149 Copyright (C) 2007-2008 Joshua Hoblitt. All rights reserved. 150 150 151 151 This program is free software; you can redistribute it and/or modify it under -
trunk/Nebulous/bin/neb-touch
r13074 r16179 1 1 #!/usr/bin/env perl 2 2 3 # Copyright (C) 2007 Joshua Hoblitt3 # Copyright (C) 2007-2008 Joshua Hoblitt 4 4 # 5 # $Id: neb-touch,v 1. 2 2007-04-28 01:19:59jhoblitt Exp $5 # $Id: neb-touch,v 1.3 2008-01-22 21:14:55 jhoblitt Exp $ 6 6 7 7 use strict; … … 16 16 use Pod::Usage qw( pod2usage ); 17 17 18 my ($server );18 my ($server, $volume); 19 19 20 20 $server = $ENV{'NEB_SERVER'} unless $server; 21 21 22 22 GetOptions( 23 'server|s=s' => \$server, 23 'server|s=s' => \$server, 24 'volume=s' => \$volume, 24 25 ) || pod2usage( 2 ); 25 26 … … 40 41 41 42 unless ($neb->find($file)) { 42 $neb->create($file) or die "failed to create Nebulous key $file"; 43 $neb->create($file, 0, $volume) 44 or die "failed to create Nebulous key $file"; 43 45 } 44 46 … … 53 55 =head1 SYNOPSIS 54 56 55 neb-touch [--server <URL>] <key>57 neb-touch [--server <URL>] [--volume <volume name>] <key> 56 58 57 59 =head1 DESCRIPTION 58 60 59 This program creates an empty file with the Nebulous key of C<<key>>. At some point in the future it almost be used to adjust the timestamp of storage instances assosiated with a Nebulous key similar to C<touch(1)>. 61 This program creates an empty file with the Nebulous key of C<<key>>. At some 62 point in the future it will be able to adjust the timestamp of storage 63 instances assosiated with a Nebulous key similar to C<touch(1)>. 60 64 61 65 =head1 OPTIONS … … 68 72 69 73 Optional if the appropriate environment variable is set. 74 75 =item * --volume|-n <volume name> 76 77 Symbolic name of the volume to create the first instance on. 78 79 Optional. 70 80 71 81 =back … … 99 109 =head1 COPYRIGHT 100 110 101 Copyright (C) 2007 Joshua Hoblitt. All rights reserved.111 Copyright (C) 2007-2008 Joshua Hoblitt. All rights reserved. 102 112 103 113 This program is free software; you can redistribute it and/or modify it under
Note:
See TracChangeset
for help on using the changeset viewer.
