You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Steven Siebert <sm...@gmail.com> on 2010/11/10 16:07:43 UTC

Export/import of repositories?

Hello all,

I was looking through available documentation and haven't found an elegant
solution yet to allow me to export/import a specific repository.

My situation is basically that I want to have multiple offline instances of
Archiva and a single Internet-facing one.  The Internet-facing instance will
have a specific repository that will house bundles that have passed the QA
process for including in our stable builds.  I wish to export this
repository and make it available on the additional offline instances.
Further, all of these offline instances will contain its own repository
specific for its enclave.  In at least one situation, one of these
repositories must also be exported and imported on another of the standalone
instances.

Is there a preferred way to export a specific repository (the artifacts and
preferably the metadata - optionally the user data) and import it into
another Archiva instance?

Thanks,

Steve

Re: Export/import of repositories?

Posted by Brett Porter <br...@apache.org>.
On 12/11/2010, at 10:55 AM, Steven Siebert wrote:

>> 
>> 
>>> 
>>> As far as archiva configuration goes, I really shouldn't need to do
>> anything
>>> with this since I have running instances of Archiva already, right?  Will
>>> having scanning enabled on the target instance detect the new repository
>>> structure and become a managed repository (ie start assigning users and
>> able
>>> to access it)?
>> 
>> Not quite - you'll still need to have the managed repository configuration
>> and user permissions for it established. You can copy the config snippet
>> from archiva.xml to archiva.xml - but if you're doing this regularly it'd be
>> best to help implement a migration feature for it.
>> 
>> 
> If I don't make repo configuration changes from source to destination
> (assuming they are in sync), I assume I wouldn't need to modify my
> archiva.xml file, right?  For example, if I have repos named the same on
> source and destination, importing via a file copy mechanism should work as
> long as I have scanning enabled, right?

Correct - I was just pointing out that the configuration is not within the repository itself.

> 
> Even still, I think an import/export (and perhaps "cloning"?) migration
> feature might be helpful, so I can do everything from the web browser.
> Unlike I experience with Artifactory, where I must export to a server-local
> filesystem location, I would prefer to click export and download a
> dynamically generated zip file, and simply import on the other instance(s).

This could be possible - but worth keeping in mind the potentially large sizes involved.

>  I think an optional "export configuration" and "export users" for the
> selected repositories would complete the use cases for a migration.

Makes sense - we already have capability to export all the users.

> 
> I'll go over my requirements once more and then submit an issue ticket and
> work on a patch.  This would be quite helpful for folks like me that have to
> work on separate enclaves (ie, government customers, banks, etc).
> 
> What do you think?
> 
> Thanks for all your help,
> 
> S

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/





Re: Export/import of repositories?

Posted by Steven Siebert <sm...@gmail.com>.
>
>
> >
> > As far as archiva configuration goes, I really shouldn't need to do
> anything
> > with this since I have running instances of Archiva already, right?  Will
> > having scanning enabled on the target instance detect the new repository
> > structure and become a managed repository (ie start assigning users and
> able
> > to access it)?
>
> Not quite - you'll still need to have the managed repository configuration
> and user permissions for it established. You can copy the config snippet
> from archiva.xml to archiva.xml - but if you're doing this regularly it'd be
> best to help implement a migration feature for it.
>
>
If I don't make repo configuration changes from source to destination
(assuming they are in sync), I assume I wouldn't need to modify my
archiva.xml file, right?  For example, if I have repos named the same on
source and destination, importing via a file copy mechanism should work as
long as I have scanning enabled, right?

Even still, I think an import/export (and perhaps "cloning"?) migration
feature might be helpful, so I can do everything from the web browser.
 Unlike I experience with Artifactory, where I must export to a server-local
filesystem location, I would prefer to click export and download a
dynamically generated zip file, and simply import on the other instance(s).
  I think an optional "export configuration" and "export users" for the
selected repositories would complete the use cases for a migration.

I'll go over my requirements once more and then submit an issue ticket and
work on a patch.  This would be quite helpful for folks like me that have to
work on separate enclaves (ie, government customers, banks, etc).

What do you think?

Thanks for all your help,

S

Re: Export/import of repositories?

Posted by Brett Porter <br...@apache.org>.
On 11/11/2010, at 10:33 PM, Steven Siebert wrote:

> Hi Brett,
> 
> Thanks for the speedy reply.
> 
> Yes, I believe your explanation works - but let me just make sure =).  The
> easiest way to move a repository from one instance to another is to copy the
> filesystem structure for that repository and have scanning enabled on the
> destination instance.  Is this correct? (I can't use rsync, since the
> instances are on separate enclaves)

Correct.

> 
> As far as archiva configuration goes, I really shouldn't need to do anything
> with this since I have running instances of Archiva already, right?  Will
> having scanning enabled on the target instance detect the new repository
> structure and become a managed repository (ie start assigning users and able
> to access it)?

Not quite - you'll still need to have the managed repository configuration and user permissions for it established. You can copy the config snippet from archiva.xml to archiva.xml - but if you're doing this regularly it'd be best to help implement a migration feature for it.

- Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/





Re: Export/import of repositories?

Posted by Steven Siebert <sm...@gmail.com>.
Hi Brett,

Thanks for the speedy reply.

Yes, I believe your explanation works - but let me just make sure =).  The
easiest way to move a repository from one instance to another is to copy the
filesystem structure for that repository and have scanning enabled on the
destination instance.  Is this correct? (I can't use rsync, since the
instances are on separate enclaves)

As far as archiva configuration goes, I really shouldn't need to do anything
with this since I have running instances of Archiva already, right?  Will
having scanning enabled on the target instance detect the new repository
structure and become a managed repository (ie start assigning users and able
to access it)?

Thanks for your time,

Steve

On Thu, Nov 11, 2010 at 1:14 AM, Brett Porter <br...@apache.org> wrote:

> Hi Steven,
>
> A few points here.
>
> In Archiva 1.3, all of the metadata is derived from the original artifacts,
> so you can just copy the filesystem to the other machine and reconfigure the
> repository to point there. It'll be reconstructed on the first scan, though
> you'll need to reconfigure the authorization as you've indicated.
>
> If you want to copy the configuration, you can paste it from the managed
> repository section of archiva.xml before starting the server. If you want to
> copy the user configuration, the only option at the moment is to copy the
> whole users database. We do have export/import tools for that (documented on
> the site), but it's for the whole user database so if there's a difference
> you might be looking for something smaller.
>
> As long as you have the repository scanning enabled, you can keep them in
> sync using rsync or similar.
>
> Is that what you were looking for?
>
> - Brett
>
> On 11/11/2010, at 2:07 AM, Steven Siebert wrote:
>
> > Hello all,
> >
> > I was looking through available documentation and haven't found an
> elegant
> > solution yet to allow me to export/import a specific repository.
> >
> > My situation is basically that I want to have multiple offline instances
> of
> > Archiva and a single Internet-facing one.  The Internet-facing instance
> will
> > have a specific repository that will house bundles that have passed the
> QA
> > process for including in our stable builds.  I wish to export this
> > repository and make it available on the additional offline instances.
> > Further, all of these offline instances will contain its own repository
> > specific for its enclave.  In at least one situation, one of these
> > repositories must also be exported and imported on another of the
> standalone
> > instances.
> >
> > Is there a preferred way to export a specific repository (the artifacts
> and
> > preferably the metadata - optionally the user data) and import it into
> > another Archiva instance?
> >
> > Thanks,
> >
> > Steve
>
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
>
>
>
>
>

Re: Export/import of repositories?

Posted by Brett Porter <br...@apache.org>.
Hi Steven,

A few points here.

In Archiva 1.3, all of the metadata is derived from the original artifacts, so you can just copy the filesystem to the other machine and reconfigure the repository to point there. It'll be reconstructed on the first scan, though you'll need to reconfigure the authorization as you've indicated.

If you want to copy the configuration, you can paste it from the managed repository section of archiva.xml before starting the server. If you want to copy the user configuration, the only option at the moment is to copy the whole users database. We do have export/import tools for that (documented on the site), but it's for the whole user database so if there's a difference you might be looking for something smaller.

As long as you have the repository scanning enabled, you can keep them in sync using rsync or similar.

Is that what you were looking for?

- Brett

On 11/11/2010, at 2:07 AM, Steven Siebert wrote:

> Hello all,
> 
> I was looking through available documentation and haven't found an elegant
> solution yet to allow me to export/import a specific repository.
> 
> My situation is basically that I want to have multiple offline instances of
> Archiva and a single Internet-facing one.  The Internet-facing instance will
> have a specific repository that will house bundles that have passed the QA
> process for including in our stable builds.  I wish to export this
> repository and make it available on the additional offline instances.
> Further, all of these offline instances will contain its own repository
> specific for its enclave.  In at least one situation, one of these
> repositories must also be exported and imported on another of the standalone
> instances.
> 
> Is there a preferred way to export a specific repository (the artifacts and
> preferably the metadata - optionally the user data) and import it into
> another Archiva instance?
> 
> Thanks,
> 
> Steve

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/