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

NAME

Maplat::Worker::BackupCommand - database backup command module

SYNOPSIS

This module does PostgreSQL database backups.

DESCRIPTION

This module is a plugin module for the "Commands" module and handles PostgreSQL backups.

Configuration

    <module>
        <modname>backupcommand</modname>
        <pm>BackupCommand</pm>
        <options>
            <db>maindb</db>
            <memcache>memcache</memcache>
            <commands>commands</commands>
            <reporting>reporting</reporting>
            <pgdump>/usr/bin/pg_dump</pgdump>
            <basedir>/path/to/backups</basedir>
            <host>localhost</host>
            <port>5432</port>
            <username>postgres</username>
            <database>RBS_DB</database>
            <sudouser>someusername</sudouser>
        </options>
    </module>

execute

Callback to run a command.

do_backup

Internal function, call the external pg_dump command to execute a full database backup.

Dependencies

This module depends on the following modules beeing configured (the 'as "somename"' means the key name in this modules configuration):

Maplat::Worker::PostgresDB as "db" Maplat::Worker::Memcache as "memcache" Maplat::Worker::Commands as "commands" Maplat::Worker::Reporting as "reporting"

SEE ALSO

Maplat::Worker

AUTHOR

Rene Schickbauer, <rene.schickbauer@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2008-2011 by Rene Schickbauer

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.