WWW::ConfixxBackup - Create Backups with Confixx and download them via FTP
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);
This module aims to simplify backups via Confixx and FTP. It logs in Confixx, creates the backups and downloads the backups via FTP.
my $backup = WWW::ConfixxBackup->new();
creates a new WWW::ConfixxBackup object.
WWW::ConfixxBackup
$backup->user('username'); print $backup->user();
$backup->password('password'); print $backup->password();
$backup->server('server'); print $backup->server();
$backup->confixx_user('confixx_username'); print $backup->confixx_user();
$backup->confixx_password('confixx_password'); print $backup->confixx_password();
$backup->confixx_server('confixx_server'); print $backup->confixx_server();
$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;
returns a list of all confixx versions (to be precisely versions of tools_backup2.php) that are supported by WWW::ConfixxBackup
returns the default value for confixx_version
$backup->http_proxy( $proxy );
sets a proxy for HTTP requests
$backup->ftp_user('ftp_user'); print $backup->ftp_user();
$backup->ftp_password('ftp_password'); print $backup->ftp_password();
$backup->ftp_server('ftp_server'); print $backup->ftp_server();
$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.
$backup->confixx_login();
$backup->ftp_login();
login on FTP server
login on Confixx server and FTP server
$backup->backup();
Logs in to Confixx and creates the backups
$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->backup_download('/path/to/directory/');
logs in to Confixx, create the backup files and downloads the three files that are created by Confixx:
$backup->waiter(100);
sets the value for the sleep-time in seconds
print $backup->errstr();
returns an error message when an error occured
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 @_ } );
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
DEBUG
$backup->DEBUG(1);
The debugging mode is turned off by default.
WWW::ConfixxBackup::Confixx WWW::ConfixxBackup::FTP WWW::Mechanize Net::FTP
Renee Baecker, <module@renee-baecker.de>
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.
To install WWW::ConfixxBackup, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::ConfixxBackup
CPAN shell
perl -MCPAN -e shell install WWW::ConfixxBackup
For more information on module installation, please visit the detailed CPAN module installation guide.