Backup modes

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

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 (using neo4j-admin database backup) and an offline (using neo4j-admin database dump) database.

Example 1. Full backup against an online database
export HEAP_SIZE=2G
mkdir /mnt/backups
bin/neo4j-admin database backup --from=192.168.1.34 --to-path=/mnt/backups/neo4j --pagecache=4G neo4j
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.

A full online database backup creates a full backup artifact in the target location (--to-path).

For more information about performing a full backup against an offline database, see Back up an offline database.

Differential backup

In the online backup version, after the initial full backup, the subsequent backups attempt to use the differential mode, where just the delta of the transaction logs since the last backup are transferred and used to create a differential backup artifact (stored in the target location). Those differential backup artifacts form a backup chain. If the required transaction logs are not available on the backup server, then the backup client falls back on performing a full backup instead.

Example 2. Differential backup against an online database
export HEAP_SIZE=2G
bin/neo4j-admin database backup --from=192.168.1.34 --to-path=/mnt/backups/neo4j --pagecache=4G neo4j
Destination is not empty, doing differential backup...
Backup complete.

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