Many thanks : It's running now!

Is it possible to define the place where we want to set the backup log  
of the class Neo4jBackup?

Best,
Bat

Le 10-juin-10 à 11:17, Tobias Ivarsson a écrit :

> Here is a quick patch of your code (I haven't tried it, but it shows  
> the
> conceptual difference):
>
>
> neo = new EmbeddedGraphDatabase(CONSTANTS.GRAPH_PATH);
> for (String datasource : new String[]{"nioneodb", "lucene"}) {
>       neo.getConfig().getTxModule().getXaDataSourceManager()
>       .getXaDataSource( datasource ).keepLogicalLogs( true );
> }
> graph = ObjectGraphFactory.instance().get(neo);
>
>
> graph.close();
> neo.shutdown();
> /*
> * here, I put my code to copy the content of the graph directory to
> the backup directory
> **/
> /**
> * I create the backup graph
> **/
> EmbeddedGraphDatabase neo = GraphJo4neo.getGraphDatabaseService();
> for (String datasource : new String[]{"nioneodb", "lucene"}) {
>       neo.getConfig().getTxModule().getXaDataSourceManager()
>       .getXaDataSource( datasource ).keepLogicalLogs( true );
> }
> EmbeddedGraphDatabase backupGraphDb = new
> EmbeddedGraphDatabase( CONSTANTS.GRAPH_BACKUP_PATH );
> IndexService backupIndexService = new
> LuceneIndexService( backupGraphDb );
> Backup backup = new Neo4jBackup( neo, backupGraphDb,
>       new ArrayList<String>()
>               {
>                 {
>                     add( "nioneodb" );
>                     add( "lucene" );
>                 }
>               } );
>
> try {
>       backup.enableFileLogger();
>       backup.setLogLevelDebug();
>       backup.doBackup();  //  /!!\ : ERROR HERE
> } catch (IOException e) {}
> backupIndexService.shutdown();
> backupGraphDb.shutdown();
>
> On Thu, Jun 10, 2010 at 11:11 AM, Batistuta Gabriel <
> batistutagabrielf...@gmail.com> wrote:
>
>>
>>> The keepLogicalLogs( true ) parts need to be there for the part of
>>> the code
>>> where you do the backups.
>> What does it means in my case? My part of code is not correct?  
>> Because
>> if I understand, you mean that I need to use the code
>> "keepLogicalLogs( true )" in the same class where I do my backup?
>> Sorry for my misunderstanding,
>>
>> Best,
>> Bat
>>
>> --
> Tobias Ivarsson <tobias.ivars...@neotechnology.com>
> Hacker, Neo Technology
> www.neotechnology.com
> Cellphone: +46 706 534857
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user

_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to