-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start a database from a volume and archive snapshot (#337)
To enable restore and clone use cases, we need a way to start a database from a volume snapshot. An archive snapshot is specified as a [TypedObjectReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#typedobjectreference-v1-core) and is passed as the helm value `database.persistence.dataSourceRef`. If the snapshot is of an archive without a journal, the journal snapshot should be passed in the helm values `database.sm.hotCopy.journalPath.persistence.dataSourceRef` and `database.sm.noHotCopy.journalPath.persistence.dataSourceRef`. If the name of the domain or database has changed, there is code to relocate the file and register the moved archive with the admin service. Unfortunately, this logic cannot differentiate between a snapshot recovered without changing the database and domain names and an SM that was restarted. In order to trigger the registration logic in this case, when taking the snapshot, there needs to be a pre-snapshot script that will create a `backup.txt` file in the archive (and journal, if it is on a separate volume). That file should just contain the backup id as plain text. That same backup id will need to be set as the helm value `database.autoImport.backup_id`. At restore time, the file will be deleted to prevent the archive from being registered twice.
- Loading branch information
Showing
13 changed files
with
897 additions
and
668 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,71 @@ | ||
module github.com/nuodb/nuodb-helm-charts/v3 | ||
|
||
go 1.14 | ||
go 1.20 | ||
|
||
require ( | ||
cloud.google.com/go v0.61.0 // indirect | ||
github.com/Masterminds/semver v1.5.0 | ||
github.com/aws/aws-sdk-go v1.34.0 // indirect | ||
github.com/ghodss/yaml v1.0.0 | ||
github.com/google/go-cmp v0.5.9 | ||
github.com/gruntwork-io/terratest v0.43.0 | ||
github.com/otiai10/copy v1.2.0 | ||
github.com/stretchr/testify v1.8.1 | ||
gopkg.in/yaml.v3 v3.0.1 | ||
k8s.io/api v0.27.2 | ||
k8s.io/apimachinery v0.27.2 | ||
) | ||
|
||
require ( | ||
github.com/aws/aws-sdk-go v1.44.122 // indirect | ||
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect | ||
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/emicklei/go-restful/v3 v3.9.0 // indirect | ||
github.com/go-errors/errors v1.1.1 // indirect | ||
github.com/go-logr/logr v1.2.3 // indirect | ||
github.com/go-openapi/jsonpointer v0.19.6 // indirect | ||
github.com/go-openapi/jsonreference v0.20.1 // indirect | ||
github.com/go-openapi/swag v0.22.3 // indirect | ||
github.com/go-sql-driver/mysql v1.5.0 // indirect | ||
github.com/gogo/protobuf v1.3.2 // indirect | ||
github.com/google/go-cmp v0.5.5 | ||
github.com/gruntwork-io/gruntwork-cli v0.6.1 // indirect | ||
github.com/gruntwork-io/terratest v0.28.10 | ||
github.com/imdario/mergo v0.3.10 // indirect | ||
github.com/otiai10/copy v1.2.0 | ||
github.com/stretchr/testify v1.7.0 | ||
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 // indirect | ||
gopkg.in/yaml.v3 v3.0.0 | ||
k8s.io/api v0.20.0 | ||
k8s.io/apimachinery v0.20.0 | ||
k8s.io/client-go v0.20.0 // indirect | ||
github.com/golang/protobuf v1.5.3 // indirect | ||
github.com/google/gnostic v0.5.7-v3refs // indirect | ||
github.com/google/gofuzz v1.1.0 // indirect | ||
github.com/google/uuid v1.3.0 // indirect | ||
github.com/gruntwork-io/go-commons v0.8.0 // indirect | ||
github.com/hashicorp/errwrap v1.0.0 // indirect | ||
github.com/hashicorp/go-multierror v1.1.0 // indirect | ||
github.com/imdario/mergo v0.3.11 // indirect | ||
github.com/jmespath/go-jmespath v0.4.0 // indirect | ||
github.com/josharian/intern v1.0.0 // indirect | ||
github.com/json-iterator/go v1.1.12 // indirect | ||
github.com/mailru/easyjson v0.7.7 // indirect | ||
github.com/mattn/go-zglob v0.0.2-0.20190814121620-e3c945676326 // indirect | ||
github.com/mitchellh/go-homedir v1.1.0 // indirect | ||
github.com/moby/spdystream v0.2.0 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.2 // indirect | ||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/pquerna/otp v1.2.0 // indirect | ||
github.com/russross/blackfriday/v2 v2.1.0 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
github.com/urfave/cli v1.22.2 // indirect | ||
golang.org/x/crypto v0.1.0 // indirect | ||
golang.org/x/net v0.8.0 // indirect | ||
golang.org/x/oauth2 v0.1.0 // indirect | ||
golang.org/x/sys v0.6.0 // indirect | ||
golang.org/x/term v0.6.0 // indirect | ||
golang.org/x/text v0.8.0 // indirect | ||
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect | ||
google.golang.org/appengine v1.6.7 // indirect | ||
google.golang.org/protobuf v1.28.1 // indirect | ||
gopkg.in/inf.v0 v0.9.1 // indirect | ||
gopkg.in/yaml.v2 v2.4.0 // indirect | ||
k8s.io/client-go v0.27.2 // indirect | ||
k8s.io/klog/v2 v2.90.1 // indirect | ||
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect | ||
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect | ||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect | ||
sigs.k8s.io/yaml v1.3.0 // indirect | ||
) |
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
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.