Package org.neo4j.webadmin.domain

Examples of org.neo4j.webadmin.domain.NoBackupFoundationException


            // for the Neo4jBackup class to throw an exception.
            if ( backupPath.listFiles() == null
                 || backupPath.listFiles().length == 0
                 || !( new File( backupPath, "neostore" ) ).exists() )
            {
                throw new NoBackupFoundationException(
                        "No foundation in: " + backupPath.getAbsolutePath() );
            }

            // Perform backup
            GraphDatabaseService genericDb = DatabaseLocator.getGraphDatabase();

            if ( genericDb instanceof EmbeddedGraphDatabase )
            {

                Backup backup = Neo4jBackup.allDataSources(
                        (EmbeddedGraphDatabase) genericDb,
                        backupPath.getAbsolutePath() );

                backup.doBackup();
            }
            else
            {
                throw new UnsupportedOperationException(
                        "Performing backups on non-local databases is currently not supported." );
            }
        }
        catch ( IllegalStateException e )
        {
            throw new NoBackupFoundationException(
                    "No foundation in: " + backupPath.getAbsolutePath() );
        }
        catch ( IOException e )
        {
            throw new BackupFailedException(
View Full Code Here

TOP

Related Classes of org.neo4j.webadmin.domain.NoBackupFoundationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.