Name

neo4j-backup — Neo4j Backup Tool

Synopsis

neo4j-backup -host <host> [-port <port>] -to target_directory

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 host:port pairs, the target is a filesystem location.

For help regarding Windows, see the reference in http://neo4j.com/docs/operations-manual/current/#powershell-windows.

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.

The backup tool will automatically detect whether it needs to do a full or an incremental backup.

SOURCE ADDRESS

Backup sources are given in the following format:

-host <host> [-port <port>]

host
In single mode, the host of a source database; in HA mode, the cluster address of a cluster member.
port
In single mode, the port of a source database backup service; in HA mode, the port of a cluster instance. If not given, the default value 6362 will be used for single mode, 5001 for HA.

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.

EXAMPLES

# Performing a backup the first time: create a blank directory and run the backup tool
mkdir /mnt/backup/neo4j-backup
neo4j-backup -host 192.168.1.34 -to /mnt/backup/neo4j-backup

# Subsequent backups using the same _target_-directory will be incremental and therefore quick
neo4j-backup -host freja -to /mnt/backup/neo4j-backup

# Performing a backup where the service is registered on a custom port
neo4j-backup -host freja -port 9999 -to /mnt/backup/neo4j-backup

# Performing a backup from HA cluster, specifying a cluster member
./neo4j-backup -host oden -to /mnt/backup/neo4j-backup

# Performing a backup from HA cluster, specifying a cluster member registered on custom port
./neo4j-backup -host oden -port 9191 -to /mnt/backup/neo4j-backup

RESTORE FROM BACKUP

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