Skip to content

Clarify how to restore a database backup in cluster#3035

Open
NataliaIvakina wants to merge 13 commits into
neo4j:devfrom
NataliaIvakina:dev-update-restore-docs
Open

Clarify how to restore a database backup in cluster#3035
NataliaIvakina wants to merge 13 commits into
neo4j:devfrom
NataliaIvakina:dev-update-restore-docs

Conversation

@NataliaIvakina
Copy link
Copy Markdown
Collaborator

@NataliaIvakina NataliaIvakina commented May 4, 2026

Our restore documentation is very standalone minded. This PR attempts to cover methods on how to restore a clustered database from a backup or dump file.

Comment thread modules/ROOT/pages/clustering/databases.adoc
Comment thread modules/ROOT/pages/clustering/databases.adoc
Comment thread modules/ROOT/pages/clustering/databases.adoc Outdated
Comment thread modules/ROOT/pages/clustering/databases.adoc Outdated
Comment thread modules/ROOT/pages/backup-restore/restore-backup.adoc Outdated
Comment thread modules/ROOT/pages/backup-restore/restore-dump.adoc Outdated
Comment thread modules/ROOT/pages/backup-restore/restore-backup.adoc Outdated
Comment thread modules/ROOT/pages/backup-restore/restore-backup.adoc Outdated
Comment thread modules/ROOT/pages/clustering/databases.adoc Outdated
Comment thread modules/ROOT/pages/clustering/databases.adoc Outdated
Comment thread modules/ROOT/pages/clustering/databases.adoc Outdated
@jackwaudby jackwaudby self-assigned this May 6, 2026
Comment thread modules/ROOT/pages/backup-restore/restore-backup.adoc Outdated
Comment thread modules/ROOT/pages/backup-restore/restore-backup.adoc Outdated
Comment thread modules/ROOT/pages/backup-restore/restore-dump.adoc Outdated
Comment thread modules/ROOT/pages/backup-restore/restore-dump.adoc Outdated
Comment thread modules/ROOT/pages/clustering/databases.adoc Outdated
@NataliaIvakina NataliaIvakina force-pushed the dev-update-restore-docs branch from 5aaf495 to 905ba55 Compare May 11, 2026 12:55
----
SHOW DATABASES;
----
. After the new database is online, you can drop the old database `foo` if it is no longer needed, or put it into read-write mode if you want to keep it for other purposes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To double check - it should be read-write mode? or read-only?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say that depends on what the customer wants to do with it.
I think this might be copied from the SPD documentation for copy and there the first part is setting the database into read-only mode when taking the backup that we then copy from to ensure that we get a consistent backup over multiple shards. In this case the documentation seems to start with the backup and not how that was obtained and then we don't know the status of the database foo. It might even be an old already deleted database that we have a backup of that we now restore using copy to foo-restored.

So not sure if we need this, if we keep it then we could maybe write something like "if the database foo was put into read-only mode before taking the backup it can now be put back into read-write if you want to keep it for other purposes"?

Comment thread modules/ROOT/pages/backup-restore/restore-backup.adoc Outdated
[[copy-data-store-from-backup]]
=== Copy the data store from a backup

The following example assumes that you have a backup of your existing database `foo` in an AWS S3 bucket.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To double-check: we are speaking about a backup created with neo4j-admin database backup command, aren't we?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, or if you use the copy command with the new --target-format=backup --target-location=S3 bucket

Comment thread modules/ROOT/pages/backup-restore/copy-database.adoc
@neo4j-docops-agent
Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

@EmelieBondesson EmelieBondesson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good but I have some comments/questions

[[copy-data-store-from-backup]]
=== Copy the data store from a backup

The following example assumes that you have a backup of your existing database `foo` in an AWS S3 bucket.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, or if you use the copy command with the new --target-format=backup --target-location=S3 bucket

Comment thread modules/ROOT/pages/backup-restore/copy-database.adoc

`--source-location` and `--source-format` cannot be used together with `--from-path-data` and/or `--from-path-txn` due to the conflict in trying to supply data from two different locations at once.

. Copy the data from a backup of your standard database `foo` into the database `foo-restored`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not create a database, only a new backup of the new database named foo-restored. That is because the --target-location=s3://bucket/folder --target-format=backup are specified.
You can still create the database foo-restored as specified below by seeding from the new backup, but the phrasing might be a little confusing, maybe better to say "into a backup for the database `foo-restored`" or something similar

----
SHOW DATABASES;
----
. After the new database is online, you can drop the old database `foo` if it is no longer needed, or put it into read-write mode if you want to keep it for other purposes.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say that depends on what the customer wants to do with it.
I think this might be copied from the SPD documentation for copy and there the first part is setting the database into read-only mode when taking the backup that we then copy from to ensure that we get a consistent backup over multiple shards. In this case the documentation seems to start with the backup and not how that was obtained and then we don't know the status of the database foo. It might even be an old already deleted database that we have a backup of that we now restore using copy to foo-restored.

So not sure if we need this, if we keep it then we could maybe write something like "if the database foo was put into read-only mode before taking the backup it can now be put back into read-write if you want to keep it for other purposes"?


* `--source-location` -- a path to the full backup of an existing database or the last differential backup in the chain.
This folder can be located locally or remotely (e.g., an S3 bucket) and must contain the full backup and all the differential backups in the chain, if any.
* `--source-format=backup` -- the format of the source backup.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick question why do we specify these options here again since we already have them in the table above for all options for copy?
And the --source-format=backup --source-location does not have to be used together with --target-format=backup --target-location specifying them like this might give that impression?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, true. I was under impression that it is required to use --source-format=backup --source-location together with --target-format=backup --target-location


[role=label--new-2026.03]
[[restore-database-using-copy-command]]
=== Restore a database backup using the `neo4j-admin database copy` command
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks copied from the other page for copy so we should remember to apply the changes made there here as well

Comment thread modules/ROOT/pages/clustering/databases.adoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants