4.0.0alpha.svn.7719
Amanda modules list
List of All Modules
All Amanda Releases

Amanda::Restore

NAME

Amanda::Restore -- interface to restore backup

SYNOPSIS

    use Amanda::Restore;

    ($self->{'restore'}, my $result_message) = Amanda::Restore->new();
    if (@$result_message) {
        foreach my $message (@$result_message) {
            $self->user_message($message);
        }
        return $params{'finished_cb'}->(1);
    }

    $self->{'restore'}->restore(
                'application_property'  => $params{'application_property'},
                'assume'                => $params{'assume'},
                'client-decompress'     => $params{'client-decompress'},
                'client-decrypt'        => $params{'client-decrypt'},
                'compress'              => $params{'compress'},
                'compress-best'         => $params{'compress-best'},
                'data-path'             => $params{'data-path'},
                'decompress'            => $params{'decompress'},
                'decrypt'               => $params{'decrypt'},
                'device'                => $params{'device'},
                'target'                => $params{'target'},
                'dumpspecs'             => $params{'dumpspecs'},
                'exact-match'           => $params{'exact-match'},
                'extract'               => $params{'extract'},
                'extract-client'        => $params{'extract-client'},
                'header'                => $params{'header'},
                'header-fd'             => $params{'header-fd'},
                'header-file'           => $params{'header-file'},
                'init'                  => $params{'init'},
                'leave'                 => $params{'leave'},
                'no-reassembly'         => $params{'no-reassembly'},
                'pipe-fd'               => $params{'pipe-fd'} ? 1 : undef,
                'restore'               => $params{'restore'},
                'server-decompress'     => $params{'server-decompress'},
                'server-decrypt'        => $params{'server-decrypt'},
                'finished_cb'           => $params{'finished_cb'},
                'interactivity'         => $params{'interactivity'},
                'reserve-tapes'         => $params{'reserve-tapes'},
                'release-tapes'         => $params{'release-tapes'},
                'feedback'              => $self);

ARGUMENTS

application_property

Application properties to add when extracting.

assume

Assume all tapes are already available, do not ask for them.

chdir

Directory where to restore.

client-decompress

Decompress only if it is client compressed.

client-decrypt

Decrypt only if it is client encrypted.

compress

Compress fast the backup image.

compress-best

Compress best the backup image.

data-path

The datapath to use when extracting.

decompress

Always decompress if compressed.

decrypt

Always decrypt if encrypted.

delay

Delay in milliseconds between progress update, default to 15000 (15 seconds)

device

target

Directory where to extract.

dumpspecs

exact-match

extract

Run the extraction on the server.

extract-client

Run the extraction on the client.

finished_cb

Callback to call when all restore are done.

Send the header to the same stream as the backup.

header-fd

Fd where to send the header.

header-file

Filename where to put the header.

init

Prepare for a restore, some device require it for faster restore.

interactivity

An interactivity module

leave

Leave the backup as it is (compressed/encrypted)

no-reassembly

Do not re-assemble split dump

pipe-fd

A fd where to send the dump

release-tapes

Release the tapes already reserved for the restore

reserve-tapes

Reserve the tapes needed for the restore

restore

Set to 0 to not do the restore, undef will do the restore. use with 'init'.

server-decompress

Decompress only if it is server compressed

server-decrypt

Decrypt only if it is server encrypted

source-fd

The fd where to read the backup (do not read from device).

FEEDBACK

The feedback must Implement the Amanda::recovery::F

$feedback->user_message($msg)

A function that get an Amanda::Message as argument, it must be sent to the user.

$feedback->set_feedback($chg)

A function called withthe initial changer as first argument.

$feedback->notif_start($dump)

A function called to notify when a new dump is started. First argument is the dump.

$hdr = $feedback->get_header()

A function to retrieve the header, the header is returned.

$feedback->clean_hdr($hdr)

A function to clean the header for compatibility. The first argument is a reference to the header.

$feedback->set($hdr, $dle, $application_property)

This function is called after clean_hdr and before send_header. First argument is header. Second argument is dle. Third argument is application_property.

$feedback->send_header

A function to send the header (first argument).

$feedback->transmit_state_file

A function to send/receive the state file (the first argument is the header).

$use_dar = $feedback->transmit_dar($use_dar)

A function to exchange dar setting. The first argument is out DAR setting. Return 1 if DAR must be used. Return 0 if DAR must not be used.

$firecttcp_supported = $feedback->get_datapath($directtcp_supported)

First argument if 1 if we support direccttcp. Return 1 if other side also support directtcp.

$dest_fh = $feedback->new_dest_fh()

Allow to change the $dest_fh

$xfer_dest = $feedback->get_xfer_dest

A function that create and return the xfer_dest

$feedback->get_mesg_fd()

return the fd of the MESG stream

$feedback->get_mesg_json()

return 1 if the MESG stream is in JSON

$feedback->get_stdout_fd()

return the stdout of the application

$feedback->get_stderr_fd()

return the stderr of the application

$feedback->start_read_dar()

A function to start reading DAR request

$feedback->send_amanda_datapath()

A function to send/receive aggrement on the amanda datapath

$feedback->send_directtcp_datapath()

A function to send/receive aggrement on the directtcp datapath

$feedback->notify_start_backup()

A function to notify the start of a restore, it is called after send_*_datapath

$feedback->start_msg($dar_data_cb)

Start read fromthe application CTL stream The first argument is a callback that must be called with lien like: 'DAR offset:length'

$feedback->send_dar_data($line)

A function to send a 'DAR offset:length' line

$feedback->run_directtcp_application($xfer)

A function to run an applicationwith directtcp datapath

$feedback->run_pre_scripts

A function to run the PRE-*-RECOVER scripts

$feedback->run_post_scripts

A function to run the POST-*-RECOVER scripts

ABOUT THIS PAGE

This page was automatically generated Tue Mar 19 07:08:17 2019 from the Amanda source tree, and documents the most recent development version of Amanda. For documentation specific to the version of Amanda on your system, use the 'perldoc' command.


4.0.0alpha.svn.7719