NAME
WE::Export - export a WE::DB database
SYNOPSIS
use WE::Export;
my $r = new WE::DB ...;
my $ex = new WE::Export $r;
$ex->export_all;
DESCRIPTION
This module provides export and import methods for the WE::DB database.
CONSTRUCTOR new
Called as new WE::Export $rootdb. Create a new WE::Export object for the given database $rootdb. Additional arguments (as dashed key-value pairs) will be passed to the object.
METHODS
- export_db
-
Create data dumper files of the metadata databases and store them into the directory specified by the
Tmpdirmember. Data::Dumper files are created because most DBM file formats are incompatible between various systems. - export_content
-
Copy the content files to the
contentsubdirectory of the directory specified by theTmpdirmember. - export_all
-
Create an archive file (.tar.gz format) of both database and content. Two member variables control paths for the export:
Tmpdirspecifies the temporary directory, where database and content files will be stored, andArchivespecifies the path for the generated archive file. If not specified, then reasonable defaults are chosen (using the systems default temp directory). After the creation of the archive file, the temporary directory will be deleted completely. - import_archive($tarfile, $destdir, %args)
-
For the specified tar archive
$tarfile(previously created byexport_all), the content will be extracted to the directory$destdir. The destination directory must not exist and will be created by the method.Further arguments %args:
BUGS
This module will only work on Windows with installed Archive::Tar and Compress::Zlib (this is usually true with ActivePerl). On Unix, you need the programs tar and gzip.
AUTHOR
Slaven Rezic - slaven@rezic.de