Prev |  | Next

## 8.1. Backup

Backups are performed over the network live from a running graph database onto a local copy. There are two types of backup: full and incremental.

A full backup copies the entire store files from the source database and is required in order to, at a later time, do an incremental backup.

An incremental backup will only retrieve and apply the changes since the most recent full or incremental backup. Because of that incremental backup is much more efficient than doing full backups every time.

| 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.

### 8.1.1. Embedded and Server

To perform a backup from a running embedded or server database run:

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

    # Performing an incremental backup
    ./neo4j-backup -incremental -from 192.168.1.34 -to /mnt/backup/neo4j-backup

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

### 8.1.2. High Availability

To perform a backup on an HA cluster you specify one or more ZooKeeper services managing that cluster.

    # Performing a full backup from HA cluster, specifying two possible ZooKeeper services
    ./neo4j-backup -full -from-ha 192.168.1.15:2181,192.168.1.16:2181 -to /mnt/backup/neo4j-backup

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

### 8.1.3. Restoring Your Data

The Neo4j backups are fully functional databases. To use a backup, all you need to do replace your database folder with the backup.

Copyright © 2011 Neo Technology

Prev | Up | Next
| Home |