The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Chroniton::Restore - implements restoration from backups

SYNOPSIS

    my $restore = Chroniton::Restore->new($config, $state, $log);
    my @versions = $restore->restorable("/foo/bar");
    $restore->restore($versions[0]);

METHODS

new(config, state, log)

Standard config, state, and log objects. Unless you're Chroniton.pm you shouldn't be calling this.

restore(file, [force])

Restores the Chroniton::File object represented by file. If force is specified, the file will be overwritten if it exists. (Otherwise, the existence will throw a fatal error.)

Returns the number of files that were successfully restored.

restorable(filename)

Lists all revisions of all files that are versions of filename. Returns a list of Chroniton::File objects.