jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Toper" <nto...@gmail.com>
Subject Re: Backup tool questions (was: Re: [jira] Commented: (JCR-442) Implement a backup tool)
Date Tue, 27 Jun 2006 09:10:14 GMT
Good idea. Thanks

On 6/27/06, Tobias Bocanegra <tobias.bocanegra@day.com> wrote:
>
> it's probably the backup handler, that needs to be able to extract the
> config.
>
> for example:
>
> BackupHandler h = new FileBaseBackupHandler("backup.zip");
> BackupConfig c = h.loadConfig();
> ....
>
>
> On 6/27/06, Nicolas Toper <ntoper@gmail.com> wrote:
> > +1 on the 2 first thoughts. Code is updated but not yet committed.
> >
> > There is an issue though. If I use conf.getBackup(), there will be an
> issue
> > in the restore operation: I wanted to save the conf file in the backup
> zip.
> > It might be possible, there are none. This is why I have put 2
> operations:
> > one save (new name is backup) and one restore.
> >
> > Here is what I have done in RepositoryImpl finally:
> >
> > //Used for backup operations
> >     public BackupRepository getBackupRepository(BackupConfig conf)
> throws
> > RepositoryException, IOException, AccessDeniedException{
> >         conf.setRepo(this);
> >         return (BackupRepository) conf.getBackup();
> >     }
> >
> > //Used for restore operations
> >     public BackupRepository getBackupRepository() throws
> > RepositoryException, IOException, AccessDeniedException{
> >         BackupConfig conf = new BackupConfig();
> >         conf.setRepo(this);
> >         return (BackupRepository) conf.getBackup();
> >     }
> >
> > This way we will have two way to call the class BackupRepository. One
> > problem though: they might be in two different states and instanciated
> > differently whether you are doing a backup (you pass a BackupConfig
> object)
> > or a restore (you just need to set up the workingFolder). Maybe the
> initial
> > backup/restore were less confusing? What do you think?
> >
> > Nicolas
> >
> > On 6/26/06, Tobias Bocanegra (JIRA) <jira@apache.org> wrote:
> > >
> > >     [
> > >
> http://issues.apache.org/jira/browse/JCR-442?page=comments#action_12417844
> ]
> > >
> > > Tobias Bocanegra commented on JCR-442:
> > > --------------------------------------
> > >
> > > some thoughts:
> > > - why needs BackupConfig.init() the repositoryimpl ? i would do a
> > > Config.getBackup(repo) instead.
> > > - you don't need to call super() in the Backup class, since it extends
> > > from Object.
> > > - if config creates backup, why do you need to pass config to save() ?
> > > (and why not passing one to restore?)
> > > - if config.getBackup() returns a Backup, why does
> > > RepositoryImpl.getBackupRepository() return a BackupRepository ?
> > >
> > >
> > >
> > > > Implement a backup tool
> > > > -----------------------
> > > >
> > > >          Key: JCR-442
> > > >          URL: http://issues.apache.org/jira/browse/JCR-442
> > > >      Project: Jackrabbit
> > > >         Type: New Feature
> > >
> > > >     Reporter: Jukka Zitting
> > > >  Attachments: patch
> > > >
> > > > Issue for tracking the progress of the Google Summer of Code project
> > > assigned to Nicolas Toper.  The original project requirements are:
> > > > "Implement a tool for backing up and restoring content in an Apache
> > > Jackrabbit content repository. In addition to the basic content
> hierarchies,
> > > the tool should be able to efficiently manage binary content, node
> version
> > > histories, custom node types, and namespace mappings. Incremental or
> > > selective backups would be a nice addition, but not strictly
> necessary."
> > >
> > > --
> > > This message is automatically generated by JIRA.
> > > -
> > > If you think it was sent incorrectly contact one of the
> administrators:
> > >    http://issues.apache.org/jira/secure/Administrators.jspa
> > > -
> > > For more information on JIRA, see:
> > >    http://www.atlassian.com/software/jira
> > >
> > >
> >
> >
> > --
> > a+
> > Nico
> > my blog! http://www.deviant-abstraction.net !!
> >
> >
>
>
> --
> -----------------------------------------< tobias.bocanegra@day.com >---
> Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
> T +41 61 226 98 98, F +41 61 226 98 97
> -----------------------------------------------< http://www.day.com >---
>



-- 
a+
Nico
my blog! http://www.deviant-abstraction.net !!

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message