Prev |  | Next

## Name

neo4j-backup — Neo4j Backup Tool

## Synopsis

neo4j-backup {-full|-incremental} -from SourceURI -to Directory [-cluster ClusterName]

## DESCRIPTION

A tool to perform live backups over the network from a running Neo4j graph database onto a local filesystem. Backups can be either full or incremental. The first backup must be a full backup, after that incremental backups can be performed.

The source(s) are given as URIs in a special format, the target is a filesystem location.

## BACKUP TYPE

-full
  copies the entire database to a directory.
-incremental
  copies the changes that have taken place since the last full or incremental backup to an existing backup store.

## SOURCE URI

Backup sources are given in the following format:

<running mode>://<host>[:<port>][,<host>[:<port>]]…

Note that multiple hosts can be defined.

running mode
  'single' or 'ha'. 'ha' is for instances in High Availability mode, 'single' is for standalone databases.
host
  In single mode, the host of a source database; in ha mode, the host of a coordinator instance. Note that multiple hosts can be given when using High Availability mode.
port
  In single mode, the port of a source database backup service; in ha mode, the port of a coordinator instance backup service. If not given, the default value `6362` will be used.

## CLUSTER NAME

-cluster
  If you have specified a cluster name for your High Availability cluster, you need to specify it when doing backups. Add the config parameter: -cluster my_custom_cluster_name

## IMPORTANT

Backups can only be performed on databases which have the configuration parameter `enable_online_backup=true` set. That will make the backup service available on the default port (`6362`). To enable the backup service on a different port use for example `enable_online_backup=port=9999` instead.

## Usage - Windows

The `Neo4jBackup.bat` script is used in the same way.

## EXAMPLES

    # Performing a full backup
    neo4j-backup -full -from single://192.168.1.34 -to /mnt/backup/neo4j-backup

    # Performing an incremental backup
    neo4j-backup -incremental -from single://freja -to /mnt/backup/neo4j-backup

    # Performing an incremental backup where the service is registered on a custom port
    neo4j-backup -incremental -from single://freja:9999 -to /mnt/backup/neo4j-backup

    # Performing a full backup from HA cluster, specifying two possible coordinators
    ./neo4j-backup -full -from ha://oden:2181,loke:2181 -to /mnt/backup/neo4j-backup

    # Performing an incremental backup from HA cluster, specifying only one coordinator
    ./neo4j-backup -incremental -from ha://oden:2181 -to /mnt/backup/neo4j-backup

    # Performing an incremental backup from HA cluster with a specific name
    # (specified by neo4j configuration 'ha.cluster_name')
    ./neo4j-backup -incremental -from ha://balder:2181 -to /mnt/backup/neo4j-backup -cluster my-cluster

## RESTORE FROM BACKUP

The Neo4j backups are fully functional databases. To use a backup, replace your database directory with the backup.

Copyright © 2013 Neo Technology

Prev | Up | Next
| Home |