NAME

WWW::ConfixxBackup - Create Backups with Confixx and download them via FTP

SYNOPSIS

use WWW::ConfixxBackup;

#shortes way (and Confixx and FTP use the same login data)
my $backup = WWW::ConfixxBackup->new(user => 'user', password => 'user', server => 'server');
my $path = './backups/today/';
$backup->backup_download($path);

#longer way (and different Confixx and FTP login data)
my $backup = WWW::ConfixxBackup->new();
$backup->ftp_user('ftp_user');
$backup->ftp_password('ftp_password');
$backup->ftp_server('server');
$backup->ftp_login();
$backup->confixx_user('confixx_user');
$backup->confixx_password('confixx_password');
$backup->confixx_server('confixx_server');
$backup->confixx_login();
$backup->confixx_version( 'confixx3.0' );
$backup->backup();
$backup->download($path);
$backup->waiter($seconds);

DESCRIPTION

This module aims to simplify backups via Confixx and FTP. It logs in Confixx, creates the backups and downloads the backups via FTP.

METHODS

new

my $backup = WWW::ConfixxBackup->new();

creates a new WWW::ConfixxBackup object.

user

$backup->user('username');
print $backup->user();

password

$backup->password('password');
print $backup->password();

server

$backup->server('server');
print $backup->server();

confixx_user

$backup->confixx_user('confixx_username');
print $backup->confixx_user();

confixx_password

$backup->confixx_password('confixx_password');
print $backup->confixx_password();

confixx_server

$backup->confixx_server('confixx_server');
print $backup->confixx_server();

confixx_version

$backup->confixx_version( 'confixx3.0' );
print $backup->confixx_version;

The parameters for the confixx script have been changed. If you know which version is used, you can set the versionstring. If you don't know it, you ask for it via detect_version.

detect_version

print $backup->detect_version;

available_confixx_versions

returns a list of all confixx versions (to be precisely versions of tools_backup2.php) that are supported by WWW::ConfixxBackup

default_confixx_version

returns the default value for confixx_version

http_proxy

$backup->http_proxy( $proxy );

sets a proxy for HTTP requests

ftp_user

$backup->ftp_user('ftp_user');
print $backup->ftp_user();

ftp_password

$backup->ftp_password('ftp_password');
print $backup->ftp_password();

ftp_server

$backup->ftp_server('ftp_server');
print $backup->ftp_server();

file_prefix

$backup->file_prefix( 'account_name' );
print $backup->file_prefix

set/get a prefix for the backup files. This is necessary if you do parallel backups.

confixx_login

$backup->confixx_login();

ftp_login

$backup->ftp_login();

login on FTP server

login

login on Confixx server and FTP server

backup

$backup->backup();

Logs in to Confixx and creates the backups

download

$backup->download('/path/to/directory');

downloads the three files that are created by Confixx:

  • mysql.tar.gz

  • html.tar.gz

  • files.tar.gz

to the given path. If path is omitted, the files are downloaded to the current directory.

backup_download

$backup->backup_download('/path/to/directory/');

logs in to Confixx, create the backup files and downloads the three files that are created by Confixx:

  • mysql.tar.gz

  • html.tar.gz

  • files.tar.gz

to the given path. If path is omitted, the files are downloaded to the current directory.

waiter

$backup->waiter(100);

sets the value for the sleep-time in seconds

errstr

print $backup->errstr();

returns an error message when an error occured

debug

If you want more debugging, you can use your own subroutine. This subroutine will get the debug message as an argument.

$backup->debug( sub{ print @_ } );

DEBUG

With DEBUG you can switch on and off the debugging mode. If you don't use your own subroutine (see debug), a default subroutine is used that just prints the messages to STDOUT

$backup->DEBUG(1);

The debugging mode is turned off by default.

SEE ALSO

WWW::ConfixxBackup::Confixx
WWW::ConfixxBackup::FTP
WWW::Mechanize
Net::FTP

AUTHOR

Renee Baecker, <module@renee-baecker.de>

COPYRIGHT AND LICENSE

2006 - 2008 by Renee Baecker

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