Search in sources :

Example 1 with DumpCommandProvider

use of org.neo4j.commandline.dbms.DumpCommandProvider in project neo4j by neo4j.

the class RealDumpCreator method dumpDatabase.

@Override
public Path dumpDatabase(String database, Path targetDumpFile) throws CommandFailedException {
    String[] args = array("--database", database, "--to", targetDumpFile.toString());
    new CommandLine(new DumpCommandProvider().createCommand(ctx)).execute(args);
    ctx.out().printf("Dumped contents of database '%s' into '%s'%n", database, targetDumpFile);
    return targetDumpFile;
}
Also used : CommandLine(picocli.CommandLine) DumpCommandProvider(org.neo4j.commandline.dbms.DumpCommandProvider)

Aggregations

DumpCommandProvider (org.neo4j.commandline.dbms.DumpCommandProvider)1 CommandLine (picocli.CommandLine)1