You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/backup-restore/online-backup.adoc
+33-31Lines changed: 33 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -161,7 +161,7 @@ Note: this is an EXPERIMENTAL option. Consult Neo4j support before use.
161
161
|false
162
162
163
163
|--prefer-diff-as-parent
164
-
|label:new[Introduced in 2025.04] When performing a differential backup, prefer the latest non-empty differential backup as the parent instead of the latest full backup.
164
+
|label:new[Introduced in 2025.04] When performing a differential backup, prefer the latest non-empty differential backup as the parent instead of the latest backup.
=== Perform a differential backup using the `--prefer-diff-as-parent` option
467
467
468
-
When creating a differential backup, the parent is usually the most recent (non-empty) backup in the directory.
469
-
In some cases you may prefer to use the latest differential backup as the parent, even if there is a more recent full backup.
470
-
You can use the latest differential backup as the parent by setting the option `--prefer-diff-as-parent` to `True`.
468
+
When taking a differential backup with the `--type=DIFF` option, the parent, by default, is the *most recent non-empty* backup in the directory.
469
+
In some cases, you may prefer to use the *latest differential* backup as the parent, even if there is a more recent full backup.
470
+
You can do this by setting the option `--prefer-diff-as-parent` to `True`.
471
+
471
472
This can be used to ensure you have differential backups for all transactions, which would allow you to restore to any point in time.
472
473
Otherwise, the transactions between a full backup and the previous differential backup will not be backed up as individual transactions.
473
474
475
+
The examples below cover different scenarios for using the `--prefer-diff-as-parent` option.
476
+
474
477
[.tabbed-example]
475
478
=====
476
-
Different scenarios for using the `--prefer-diff-as-parent` option
477
-
[NOTE]
478
-
The general behaviour while taking a differential backup with the `--type=DIFF` option is that the *most recent non-empty* backup is used as the parent.
479
-
With the `--prefer-diff-as-parent` option, the *most recent non-empty differential* backup is used as the parent *when possible*:
480
-
in case there is no backup that satisfy the condition, then we fall back to the general behaviour.
Let's assume that the database is empty and that we don't write anything to it, while still taking hourly backups.
613
+
Let's assume that the database is empty and you do not write anything to it, while still taking hourly full backups.
615
614
616
615
[cols="h,e,m,h,h"]
617
616
|===
@@ -630,8 +629,8 @@ Let's assume that the database is empty and that we don't write anything to it,
630
629
| 0
631
630
|===
632
631
633
-
In this casewith the `--type=DIFF` option we would fail both with the `--prefer-diff-as-parent` and the `default` behaviour,
634
-
since we're looking for the *latest non-empty* backup and there are only empty backups.
632
+
In this case, you cannot perform a differential backup with the `--type=DIFF` option, and the below command fails anyway, whether you used the `--prefer-diff-as-parent` or not.
633
+
This occurs because we are looking for the *latest non-empty* backup, and there are only empty backups.
635
634
636
635
[source,shell]
637
636
----
@@ -641,7 +640,7 @@ neo4j-admin database backup \
641
640
neo4j
642
641
----
643
642
644
-
But if we select the `--type=AUTO` option, the command will succeed and the result would be another empty full backup.
643
+
But if you select the `--type=AUTO` option, the command will succeed, and the result would be another empty *full* backup.
0 commit comments