Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when-deleting-a-space,-the-snapshot-of-the-space-is-also-deleted #1861

Merged
merged 5 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs-2.0/3.ngql-guide/9.space-statements/5.drop-space.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

`DROP SPACE` can only delete the specified logic graph space while retain all the data on the hard disk by modifying the value of `auto_remove_invalid_space` to `false` in the Storage service configuration file. For more information, see [Storage configuration](../../5.configurations-and-logs/1.configurations/4.storage-config.md).

!!! warning

After you execute `DROP SPACE`, even if the snapshot contains data of the graph space, the data of the graph space cannot be recovered. But if the value of `auto_remove_invalid_space` is set to `false`, contact the sales team to recover the data of the graph space.

## Prerequisites

Only the God role can use the `DROP SPACE` statement. For more information, see [AUTHENTICATION](../../7.data-security/1.authentication/1.authentication.md).
Expand Down
4 changes: 4 additions & 0 deletions docs-2.0/backup-and-restore/3.manage-snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ nebula> SHOW SNAPSHOTS;

## Restore data with snapshots

!!! warning

When you restore data with snapshots, make sure that the graph spaces backed up in the snapshot have not been dropped. Otherwise, the data of the graph spaces cannot be restored.

Currently, there is no command to restore data with snapshots. You need to manually copy the snapshot file to the corresponding folder, or you can make it by using a shell script. The logic implements as follows:

1. After the snapshot is created, the `checkpoints` directory is generated in the installation directory of the leader Meta server and all Storage servers, and saves the created snapshot. Taking this topic as an example, when there are two graph spaces, the snapshots created are saved in `/usr/local/nebula/data/meta/nebula/0/checkpoints`, `/usr/local/nebula/data/storage/ nebula/3/checkpoints` and `/usr/local/nebula/data/storage/nebula/4/checkpoints`.
Expand Down