When to use?
When I try to export some spaces include many pages,I can't got it.So i tried many tools to export Space,but finally faild!
Maybe the exported file too large to exported?
so I think one page by one page export is better,I found the Confluence.pm by Asgeir.Nilsen@telenor.com, so i want to use it,at last ,i got a script to export space to another installation.
How to use?
you should read http://confluence.atlassian.com/display/CONFEXT/Perl+XML-RPC+client first.
(install Perl,RPC::XML)
then open SpaceCopy.pl use text editor,modify follow lines:
The lines you should modify
my $url = "http://source/rpc/xmlrpc"; my $adminuser = "src_user"; my $adminpass = "src_passwd"; my $src_space = "src_space"; my $dest_url = "http://dest/rpc/xmlrpc"; my $dest_adminuser = "dest_user"; my $dest_adminpass = "dest_passwd"; my $dest_space = "dest_space";
because Confluence can't update parentId directly,so i add some script to Confluence.pm,open Confluence.pm use text editor ,
The lines added to Confluence.pm
sub updateParent {
my Confluence $self = shift;
my ($newPage) = @_;
my $saveRaise = setRaiseError(0);
# my $result = $self->storePage($newPage);
my $oldPage = $self->getPage($newPage->{space}, $newPage->{title});
$newPage->{id} = $oldPage->{id};
$newPage->{version} = $oldPage->{version};
$newPage->{content} = $oldPage->{content};
my $result = $self->storePage($newPage);
return $result;
}
then execute "perl SpaceCopy.pl"
