-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add section on recovery and reorganize
- Loading branch information
Showing
12 changed files
with
105 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
docs/resources/1.overview.md → docs/resources/1.useful-links.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
id: overview | ||
title: Resources | ||
id: useful-links | ||
title: Useful links | ||
--- | ||
|
||
## Community and chat | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
id: global-management | ||
title: Global management | ||
--- | ||
|
||
## Checking system health | ||
|
||
The following query returns an `Empty` response or an error code depending on the status of the database: | ||
|
||
```sql | ||
SYSCTL REPORT STATUS | ||
``` | ||
|
||
If you receive an error code, we recommend you to connect to the host and check logs. If the server has crashed, you may need to [recover the database](recovery). | ||
|
||
## Inspecting all spaces | ||
|
||
The single DDL query that lets you do a "sneak peek" into the status of the entire system is the `INSPECT GLOBAL` query. It | ||
returns a JSON string like this: | ||
```json | ||
{ | ||
"spaces:"["space1", "space2"], | ||
"users":["root", "staging_server"], | ||
"settings:{}, | ||
} | ||
``` | ||
|
||
- `spaces`: lists all the spaces in the system | ||
- `users`: lists all users | ||
:::info Access control note | ||
This is only returned if you are the `root` user. Standard users cannot see the other users in the system | ||
::: | ||
- `settings`: returns system settings (currently an empty dictionary is returned) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
id: recovery | ||
title: Recovery | ||
--- | ||
|
||
In the unforeseen event that a power failure or other catastrophic system failure causes the database to crash, the Skytable server will fail to start normally. Usually it will exit with a nonzero code and an error message such as "journal-corrupted." In such cases, you will need to recover the journal(s) and/or any other corrupted file(s). | ||
|
||
## Recovering database files | ||
|
||
To repair the database, simply run this on the command line **in the working directory of the database**: | ||
|
||
```sh | ||
skyd repair | ||
``` | ||
The recovery system will first create a full backup of the current data files in a subdirectory in the `backups/` directory. It will then go over each database file, try to detect any errors and make any approriate repairs. | ||
|
||
## Important notes | ||
|
||
- The recovery system is *very conservative* and will attempt to restore the database to the most recent working state. Any remaining data is deemed unreliable and not loaded | ||
- Please ensure that you have sufficient disk space before attempting a repair | ||
- The earlier in the file the corruption happens, the greater the amount of data lost | ||
|
||
## Post recovery | ||
|
||
After running a repair operation, if a signficant amount of data loss has occurred (as reported by `skyd`) then we strongly recommend you to manually look through your datasets. The recovery process guarantees that the *restored data* is intact. If this failure resulted from power loss, in the future you may consider installing power backup systems if self-hosting or choosing a reliable cloud provider. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: System administration | ||
--- | ||
|
||
In the following sections, we explore general system administration options with Skytable such as configuration, user management, system health and others. Please note that to use some of these guides you may need direct access to the host on which the database server is running; operations such as recovery and changing the root password require host access. | ||
|
||
## Guides | ||
|
||
Here's an overview of the different administration guides: | ||
|
||
- [**Configuration**](configuration): Understand how Skytable can be configured using command-line arguments, environment variables or a configuration file and what all configuration options are available | ||
- [**User management**](user-management): Learn about account types, permissions and how you can manage multiple users | ||
- [**Global management**](global-management): Learn how to check system health and manage the global state of your database instances | ||
- [**Data recovery**](recovery): Understand what to do after a system crash and how to recover data if needed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters