Show
Ignore:
Timestamp:
04/08/10 17:05:05 (4 years ago)
Author:
depesz
Message:

add ability to force data dir - required to make archive usable as 'pre-removal-processing' for restore

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/omnipitr/lib/OmniPITR/Program/Archive.pm

    r100 r102  
    160160 
    161161        if ( $response->{ 'error_code' } ) { 
    162             $self->log->fatal( 'Error while compressing with %s : %s', $compression, Dumper($response) ); 
     162            $self->log->fatal( 'Error while compressing with %s : %s', $compression, Dumper( $response ) ); 
    163163        } 
    164164 
     
    293293        'dst-local|dl=s@', 
    294294        'dst-remote|dr=s@', 
     295        'force-data-dir|f', 
    295296        'gzip-path|gp=s', 
    296297        'log|l=s', 
     
    355356    my $self = shift; 
    356357 
    357     $self->log->fatal( "Given data-dir (%s) is not valid", $self->{ 'data-dir' } ) unless -d $self->{ 'data-dir' } && -f File::Spec->catfile( $self->{ 'data-dir' }, 'PG_VERSION' ); 
     358    unless ( $self->{ 'force-data-dir' } ) { 
     359        $self->log->fatal( "Given data-dir (%s) is not valid", $self->{ 'data-dir' } ) unless -d $self->{ 'data-dir' } && -f File::Spec->catfile( $self->{ 'data-dir' }, 'PG_VERSION' ); 
     360    } 
    358361 
    359362    my $dst_count = scalar( @{ $self->{ 'destination' }->{ 'local' } } ) + scalar( @{ $self->{ 'destination' }->{ 'remote' } } );