I think someone will write a wiki/manual for the new backup tool soon, and there'll be multiple ways of accessing it also, f.ex. through java code, through a script and maybe through JMX a.s.o. but for the time being the java code works like this:
o To have your running graph database support clients connecting to it and fetching online backups just have the neo4j-com and neo4j-backup jars (with its dependencies, like netty) on the classpath, that's it. o The code to perform an online backup<https://github.com/neo4j/graphdb/blob/master/backup/src/main/java/org/neo4j/backup/OnlineBackup.java>looks like this: OnlineBackup.from( "localhost" ).full( "directory/to/backup/to" ).close(); .... then, at a later time .... OnlineBackup.from( "localhost" ).incremental( "directory/to/backup/to" ).close(); Or you can store the OnlineBackup object and close whenever you feel like. 2011/2/9 Peter Neubauer <[email protected]> > Gian and all, > we are moving the OnlineBackup component onto the Hich Availability > logic. It will be included into Neo4j 1.3, but we didn't move the > OnlineBackup Component over to GITHub, so for the time being, it is > not included in the milestone releases. > > Gian, are you actively using OnlineBackup? Let's connect and sort out > how to best move! > > If you are using the component, please consider staying on 1.2 or > contact us so we can solve your usecase while we are on milestones, if > you need it. > > Thanks for your consideration! > > /peter > > On Wed, Feb 9, 2011 at 8:00 AM, Gian Luca Farina Perseu > <[email protected]> wrote: > > Starting from now I'll try to use M3 .... but with this release I have > > this error related to > > > > java.lang.NoClassDefFoundError: org/neo4j/onlinebackup/Neo4jBackup > > > > I didn't check yet in documentation (I'm involved in some other topics > > ...) ..... Neo4jBackup is simply missing from build or backup > > management is different from M2 ? > > > > Many thanks !! > > > > ------------------ > > > > [INFO] BaseResource - 2011.02.09 08:00:02 - ServiceResource Constructor. > > [INFO] TimeoutHandler - Time: Wed Feb 09 08:00:02 CET 2011 > > 9-feb-2011 8.00.02 > > org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog > > doInternalRecovery > > INFO: Non clean shutdown detected on log > > [\temp\graphdb\neo4j_online_backup\nioneo_logical.log.1]. Recovery > > started ... > > extension:org.neo4j.kernel.KernelExtension[online backup] > > extension:org.neo4j.graphdb.index.IndexProvider[lucene] > > 9-feb-2011 8.00.02 > > org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog > > doInternalRecovery > > INFO: Non clean shutdown detected on log > > [C:\temp\graphdb\neo4j_online_backup\index/lucene.log.1]. Recovery > > started ... > > extension:org.neo4j.kernel.KernelExtension[kernel jmx] > > extension:org.neo4j.kernel.KernelExtension[shell] > > extension:org.neo4j.kernel.KernelExtension[kernel udc] > > 9-feb-2011 8.00.02 com.sun.jersey.spi.container.ContainerResponse > > mapMappableContainerException > > GRAVE: The exception contained within MappableContainerException could > > not be mapped to a response, re-throwing to the H > > TTP container > > java.lang.NoClassDefFoundError: org/neo4j/onlinebackup/Neo4jBackup > > at > com.twentyonestyle.mt.service.BackupManager.doBackup(BackupManager.java:63) > > at > com.twentyonestyle.mt.rest.app.resource.ServiceResource.doBackup(ServiceResource.java:535) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at > com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispa > > tch(AbstractResourceMethodDispatchProvider.java:168) > > at > com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDisp > > atcher.java:70) > > at > com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279) > > at > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136) > > at > com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86) > > at > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136) > > at > com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74) > > at > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1357) > > at > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1289) > > at > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1239) > > at > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229) > > at > com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420) > > at > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) > > at > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:725) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) > > at > com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.doFilter(ServletAdapter.java:1002) > > at > com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.invokeFilterChain(ServletAdapter.java:942) > > at > com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:404) > > at > com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:349) > > at > com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) > > at > com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:817) > > at > com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:718) > > at > com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1007) > > at > com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) > > at > com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) > > at > com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) > > at > com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) > > at > com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) > > at > com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) > > at > com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) > > at com.sun.grizzly.ContextTask.run(ContextTask.java:71) > > at > com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) > > at > com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) > > at java.lang.Thread.run(Unknown Source) > > Caused by: java.lang.ClassNotFoundException: > org.neo4j.onlinebackup.Neo4jBackup > > at java.net.URLClassLoader$1.run(Unknown Source) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(Unknown Source) > > at java.lang.ClassLoader.loadClass(Unknown Source) > > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) > > at java.lang.ClassLoader.loadClass(Unknown Source) > > ... 40 more > > 9-feb-2011 8.00.02 com.sun.grizzly.http.servlet.ServletAdapter doService > > GRAVE: service exception: > > javax.servlet.ServletException: java.lang.NoClassDefFoundError: > > org/neo4j/onlinebackup/Neo4jBackup > > at > com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:424) > > at > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) > > at > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:725) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) > > at > com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.doFilter(ServletAdapter.java:1002) > > at > com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.invokeFilterChain(ServletAdapter.java:942) > > at > com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:404) > > at > com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:349) > > at > com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) > > at > com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:817) > > at > com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:718) > > at > com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1007) > > at > com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) > > at > com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) > > at > com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) > > at > com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) > > at > com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) > > at > com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) > > at > com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) > > at com.sun.grizzly.ContextTask.run(ContextTask.java:71) > > at > com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) > > at > com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) > > at java.lang.Thread.run(Unknown Source) > > Caused by: java.lang.NoClassDefFoundError: > org/neo4j/onlinebackup/Neo4jBackup > > at > com.twentyonestyle.mt.service.BackupManager.doBackup(BackupManager.java:63) > > at > com.twentyonestyle.mt.rest.app.resource.ServiceResource.doBackup(ServiceResource.java:535) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at > com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispa > > tch(AbstractResourceMethodDispatchProvider.java:168) > > at > com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDisp > > atcher.java:70) > > at > com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279) > > at > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136) > > at > com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86) > > at > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136) > > at > com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74) > > at > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1357) > > at > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1289) > > at > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1239) > > at > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229) > > at > com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420) > > ... 22 more > > Caused by: java.lang.ClassNotFoundException: > org.neo4j.onlinebackup.Neo4jBackup > > at java.net.URLClassLoader$1.run(Unknown Source) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(Unknown Source) > > at java.lang.ClassLoader.loadClass(Unknown Source) > > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) > > at java.lang.ClassLoader.loadClass(Unknown Source) > > ... 40 more > > > > On Tue, Feb 8, 2011 at 8:13 PM, Mattias Persson > > <[email protected]> wrote: > >> The error you're getting is the exact same error. Recovery and > incremental > >> backup in essence uses the same functionality under the covers. You > probably > >> won't get that error with the latest builds. > >> > >> Great that the new builds fixed it b.t.w! > >> > >> 2011/2/8 Gian Luca Farina Perseu <[email protected]> > >> > >>> Hi Mattias, > >>> > >>> some minutes ago, I use M3 release to recover another failured DB due > >>> transactions error. > >>> > >>> My application still use M2 as previously described, I change on the > >>> fly M3 libs to recover the DB. All seems to work well. > >>> > >>> Then I replace M3 libs with originals M2 because I tried to use Backup > >>> feature and I receive an NotClassFound. > >>> > >>> But with M2, when I launch backup I receive this error: > >>> > >>> [INFO] TimeoutHandler - Time: Tue Feb 08 17:31:37 CET 2011 > >>> 8-feb-2011 17.31.37 > >>> org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog > >>> doInternalRecovery > >>> INFO: Non clean shutdown detected on log > >>> [\temp\graphdb\neo4j_online_backup\nioneo_logical.log.1]. Recovery > >>> started ... > >>> 8-feb-2011 17.31.37 > >>> org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog > >>> doInternalRecovery > >>> INFO: Non clean shutdown detected on log > >>> [\temp\graphdb\neo4j_online_backup/lucene/lucene.log.1]. Recovery > >>> started ... > >>> 8-feb-2011 17.31.37 > >>> org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog > >>> doInternalRecovery > >>> INFO: Non clean shutdown detected on log > >>> [\temp\graphdb\neo4j_online_backup/lucene-fulltext/lucene.log.1]. > >>> Recovery star > >>> ted ... > >>> 8-feb-2011 17.31.37 > >>> org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog > >>> doInternalRecovery > >>> INFO: Non clean shutdown detected on log > >>> [C:\temp\graphdb\neo4j_online_backup\index/lucene.log.1]. Recovery > >>> started ... > >>> 8-feb-2011 17.31.37 org.neo4j.onlinebackup.Neo4jBackup doBackup > >>> INFO: Initializing backup. > >>> 8-feb-2011 17.31.37 org.neo4j.onlinebackup.Neo4jBackup runMultiBackup > >>> INFO: Checking and preparing [lucene-index, lucene, nioneodb, > >>> lucene-fulltext] data sources. > >>> java.lang.NullPointerException > >>> at > >>> > org.neo4j.index.impl.lucene.IndexType$CustomType.removeFromDocument(IndexType.java:155) > >>> at > >>> > org.neo4j.index.impl.lucene.LuceneCommand$RemoveCommand.perform(LuceneCommand.java:228) > >>> at > >>> > org.neo4j.index.impl.lucene.LuceneTransaction.doCommit(LuceneTransaction.java:227) > >>> at > >>> > org.neo4j.kernel.impl.transaction.xaframework.XaTransaction.commit(XaTransaction.java:319) > >>> at > >>> > org.neo4j.kernel.impl.transaction.xaframework.XaResourceManager.injectTwoPhaseCommit(XaResourceManager.java:3 > >>> 73) > >>> at > >>> > org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.applyTwoPhaseCommitEntry(XaLogicalLog.java:574) > >>> at > >>> > org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.applyEntry(XaLogicalLog.java:466) > >>> at > >>> > org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.access$200(XaLogicalLog.java:67) > >>> at > >>> > org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog$LogApplier.readAndApplyEntry(XaLogicalLog.java:125 > >>> 9) > >>> at > >>> > org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.applyLog(XaLogicalLog.java:1316) > >>> at > >>> > org.neo4j.kernel.impl.transaction.xaframework.LogBackedXaDataSource.applyLog(LogBackedXaDataSource.java:55) > >>> at > >>> > org.neo4j.onlinebackup.impl.AbstractResource.applyLog(AbstractResource.java:44) > >>> at > >>> > org.neo4j.onlinebackup.Neo4jBackup$Neo4jBackupTask.run(Neo4jBackup.java:428) > >>> at > >>> org.neo4j.onlinebackup.Neo4jBackup.runMultiBackup(Neo4jBackup.java:313) > >>> at > org.neo4j.onlinebackup.Neo4jBackup.doBackup(Neo4jBackup.java:240) > >>> at > >>> > com.twentyonestyle.mt.service.BackupManager.doBackup(BackupManager.java:65) > >>> at > >>> > com.twentyonestyle.mt.rest.app.resource.ServiceResource.doBackup(ServiceResource.java:535) > >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > >>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > >>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown > Source) > >>> at java.lang.reflect.Method.invoke(Unknown Source) > >>> at > >>> > com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispa > >>> tch(AbstractResourceMethodDispatchProvider.java:168) > >>> at > >>> > com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDisp > >>> atcher.java:70) > >>> at > >>> > com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279) > >>> at > >>> > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136) > >>> at > >>> > com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86) > >>> at > >>> > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136) > >>> at > >>> > com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74) > >>> at > >>> > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1357) > >>> at > >>> > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1289) > >>> at > >>> > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1239) > >>> at > >>> > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229) > >>> at > >>> > com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420) > >>> at > >>> > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) > >>> at > >>> > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:725) > >>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) > >>> at > >>> > com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.doFilter(ServletAdapter.java:1002) > >>> at > >>> > com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.invokeFilterChain(ServletAdapter.java:942) > >>> at > >>> > com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:404) > >>> at > >>> > com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:349) > >>> at > >>> > com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) > >>> at > >>> > com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:817) > >>> at > >>> com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:718) > >>> at > >>> com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1007) > >>> at > >>> > com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) > >>> at > >>> > com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) > >>> at > >>> > com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) > >>> at > >>> > com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) > >>> at > >>> > com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) > >>> at > >>> > com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) > >>> at > >>> > com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) > >>> at com.sun.grizzly.ContextTask.run(ContextTask.java:71) > >>> at > >>> > com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) > >>> at > >>> > com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) > >>> at java.lang.Thread.run(Unknown Source) > >>> > >>> Any suggestions ? > >>> > >>> Thank you for your effort ! > >>> > >>> Regards ! > >>> _______________________________________________ > >>> Neo4j mailing list > >>> [email protected] > >>> https://lists.neo4j.org/mailman/listinfo/user > >>> > >> > >> > >> > >> -- > >> Mattias Persson, [[email protected]] > >> Hacker, Neo Technology > >> www.neotechnology.com > >> _______________________________________________ > >> Neo4j mailing list > >> [email protected] > >> https://lists.neo4j.org/mailman/listinfo/user > >> > > _______________________________________________ > > Neo4j mailing list > > [email protected] > > https://lists.neo4j.org/mailman/listinfo/user > > > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > -- Mattias Persson, [[email protected]] Hacker, Neo Technology www.neotechnology.com _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

