NAME

Chroniton::Backup - implements full and incremental backups

EXPORT

None of these subroutines are exported by default. Please load them into your namespace by specifying them on the module load line:

use Chroniton::Backup qw(backup);

backup($config, $log, \@sources, $destination, [$against])

Perfoms a backup of each file in @sources to a new subdirectory of $destination. If $against is specified, an incremental backup is performed by comparing the files in each of @sources to the identically named files in $against. If the files are the same, the new file in $destination is linked to the version in $against (instead of being copied from the $source).

Returns a BackupSet object. Dies on a fatal error, otherwise logs errors and warnings to $log, a Chroniton::Messages object.

_clone_dir($config, $log, $contents, $src, $dest, [$against, $compare_ref])

Clones $src into $dest, recursively decending into subdirectories, depth first. If $against is specified, each file in $src is compared against the file of the same name in $against via the $compare_ref subroutine. This routine should return 1 if the file from $src needs to be copied to $dest, or 0 if the file placed in $dest should be a (relative) symbolic link to the file in $against.

Returns nothing. Dies on a fatal error, otherwise logs errors and warnings to $log, a Chroniton::Messages object.