-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sections on backing up and upgrading Restate
- Loading branch information
Showing
4 changed files
with
58 additions
and
345 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
sidebar_position: 8 | ||
description: "Strategies for backing up and restoring the Restate data store" | ||
--- | ||
|
||
import Admonition from '@theme/Admonition'; | ||
|
||
# Data backup | ||
|
||
<Admonition type="note"> | ||
Future versions of Restate will support distributed deployment with spanning multiple machnes enhancing the availability you can achieve with your Restate cluster. This document only covers single-node Restate deployments. | ||
</Admonition> | ||
|
||
The Restate server persists both metadata (such as the details of deployed services, in-flight invocations) and data (e.g. virtual object and workflow state keys) in its datastore, which is located in its base directory (by default, the `restate-data` path relative to the startup working directory). Restate is configured to perform write-ahead logging with fsync to the log enabled to ensure that effects are fully persisted before being acknowledged to participating services. | ||
|
||
Backing up the full contents of the Restate base directory will ensure that you can recover this state in the event of a server loss. We recommend placing the data directory on fast block storage that supports atomic snapshots, such as [Amazon EBS volume snapshots](https://docs.aws.amazon.com/ebs/latest/userguide/ebs-snapshots.html). Alternatively, we recommend stopping the `restate-server` process and archiving the base directory contents before restarting it. This will ensure that the backup contains an atomic view of the persisted state. | ||
|
||
In addition to state, you should also back up the Restate configuration used. | ||
|
||
## Restoring backups | ||
|
||
<Admonition type={"caution"} title={"Multiple copies of Restate"}> | ||
Restate can not guarantee that it is the only instance of the given node. You must take care to only run one instance of any given Restate node when restoring copies of the data store from backup, as running multiple instances might lead to "split-brain" scenarios where different servers process invocations for the same set of services, causing state to diverge. | ||
</Admonition> | ||
|
||
Restoring from backup requires: | ||
|
||
- Restate server release compatible with the version which produced the data store snapshot being resotred; see the section on [version upgrade and rollback](upgrading) | ||
- compatible [Restate server configuration](/operate/configuration/server) - in particular, ensure that `cluster-name` and `node-name` attributes match | ||
- exclusive access to a data directory restored from the most recent atomic snapshot of the previous restate installation |
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,28 @@ | ||
--- | ||
sidebar_position: 7 | ||
description: "Restate installation software version upgrades, compatibility policy, rollback strategy" | ||
--- | ||
|
||
# Version upgrades | ||
|
||
Restate follows [Semantic Versioning](https://semver.org/). The server persists compatibility markers which enable it to detect incompatible data versions. However, you should be careful to follow supported version migration paths and perform [data backups](data-backup) when performing software upgardes. | ||
|
||
## What is the Restate compatibility promise? | ||
|
||
Migrating to the latest patch level should always be possible and is recommended to benefit from the latest bugfixes and enhancements available. | ||
|
||
Incremental minor version upgrades will retain functional compatibility with the immediate prior version. That is, for any minor version update, you will be able to upgrade from `x.y` to `x.(y+1)` while retaining all persisted data and metadata. You must not skip minor version upgrades as this might cause you to miss one-time datastore migrations required for preserving forward compatibility. | ||
|
||
We recognize that sometimes unexpected compatibility scenarios might occur. For this reason downgrading a Restate installation to the latest patch level of the previous minor version is also supported. For example, you can safely rollback the Restate server versionf rom `x.(y).0` to `x.(y-1).z` if you encounter unexpected compatibility issues elsewhere in your services. | ||
|
||
Consult the release notes for specific details of any new version when planning upgrades. | ||
|
||
## Service compatibility | ||
|
||
Registered Restate services must use a compatible SDK which is compatible with the service protocol version(s) the running Restate server. Note that Restate SDK artifacts follow independent versioning from the server. You can find the latest SDK compatibility matrix in the SDKs' respective repositories: | ||
|
||
* [Restate Java SDK](https://github.com/restatedev/sdk-java#versions) | ||
* [Restate TypeScript SDK](https://github.com/restatedev/sdk-typescript#versions) | ||
* [Restate Go SDK](https://github.com/restatedev/sdk-go#versions) | ||
* [Restate Python SDK](https://github.com/restatedev/sdk-python#versions) | ||
* [Restate Rust SDK](https://github.com/restatedev/sdk-rust#versions) |
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
Oops, something went wrong.