Backup modes

This section describes the backup modes.

The backup client can operate in two different modes – a full backup and an incremental backup.

1. Full backup

A full backup is always required initially for the very first backup into a target location.

The full backup can be run against both an online and an offline database.

Example 1. Full backup against an online database
$neo4j-home> export HEAP_SIZE=2G
$neo4j-home> mkdir /mnt/backups
$neo4j-home> bin/neo4j-admin backup --from=192.168.1.34 --backup-dir=/mnt/backups/neo4j --database=neo4j --pagecache=4G
Doing full backup...
2017-02-01 14:09:09.510+0000 INFO  [o.n.c.s.StoreCopyClient] Copying neostore.nodestore.db.labels
2017-02-01 14:09:09.537+0000 INFO  [o.n.c.s.StoreCopyClient] Copied neostore.nodestore.db.labels 8.00 kB
2017-02-01 14:09:09.538+0000 INFO  [o.n.c.s.StoreCopyClient] Copying neostore.nodestore.db
2017-02-01 14:09:09.540+0000 INFO  [o.n.c.s.StoreCopyClient] Copied neostore.nodestore.db 16.00 kB
...
...
...

For more information about online backup options and how to control memory usage, see Back up an online database.

For a detailed example on performing a full backup against an offline database, see Restore a database dump.

2. Incremental backup

After the initial full backup, the subsequent backups attempt to use the incremental mode, where just the delta of the transaction logs since the last backup are transferred and applied onto the target location. If the required transaction logs are not available on the backup server, then the backup client falls back on performing a full backup instead, unless --fallback-to-full is disabled.

The incremental backup can be run only against an online database.

Example 2. Incremental backup against an online database
$neo4j-home> export HEAP_SIZE=2G
$neo4j-home> bin/neo4j-admin backup --from=192.168.1.34 --backup-dir=/mnt/backups/neo4j --database=neo4j --pagecache=4G
Destination is not empty, doing incremental backup...
Backup complete.

For more information about online backup options and how to control memory usage, see Back up an online database.