-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add scripts for qdrant backup and restore #81
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
base: main
Are you sure you want to change the base?
Conversation
938ad63 to
8d1fe9f
Compare
| failedJobsHistoryLimit: 1 | ||
| jobTemplate: | ||
| spec: | ||
| backoffLimit: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why so low? default is 6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better if we know why it failed before re-trying it could be a non-issue at the same time be a critical issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always assume a non proficient operator at customer side
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, i can increase to 3 for know since these values will be overridden incase of a deployment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
|
||
| # Job history limits | ||
| successfulJobsHistoryLimit: 1 | ||
| failedJobsHistoryLimit: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have used these configuration to avoid saturation of (completed/failed) jobs in the cluster. At the moment i think the one previous run is what is important incase of debugging or manually tracking progress.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try to bump failures and rertries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| secretKeyRef: | ||
| name: qdrant-credentials-minio # change this to your qdrant kubernetes secret name | ||
| key: QDRANT_S3_ACCESS_KEY_ID | ||
| - name: QDRANT_S3_SECRET_ACCESS_KEY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use AWS_* vars then you can use default toolchains/sdk will work out of the box
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason i used custom vars is to avoid instances where the script ends up using or forcing update their user's current configuration. For example they could already have a un-related AWS_* vars that they dont want to change but be able to run the script.
Isolation was the main reason here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but these are only mounted to this job?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script should also be ran directly on a machine(workstation/personal).
| name: qdrant-credentials | ||
| type: Opaque | ||
| stringData: | ||
| QDRANT_S3_ACCESS_KEY_ID: your-s3-access-key-id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Important steps to note: | ||
|
|
||
| - **Create** S3 bucket. | ||
| - Here you can use object storage service providers like StackIt, AWS e.t.c or a self hosted solution like [minio](https://www.min.io/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we still use minio? I think there was a license change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically yeah, it still has community edition but after the license change releases will be missing pre-built binaries and management console but it would be better to switch to another tool like https://garagehq.deuxfleurs.fr/.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's do that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, sure maybe just add it to the docs since at the moment the client already has an S3 storage setup.
qdrant-backup-restore/k8s/README.md
Outdated
| value: "s3" | ||
| ```` | ||
|
|
||
| (Re)Deploy the Qdrant cluster! This should trigger a rolling update on the qdrant nodes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we might need to go nitty gritty here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or link to official docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, will do!
| - name: qdrant-backup-restore-script | ||
| configMap: | ||
| name: qdrant-backup-restore-script | ||
| defaultMode: 0755 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is sensible mode for a multi user target, in containers you can be a bit stricter (f.e. 700) but keep it like this for now
create snapshots based on shard location
update documentation
qdrant_backup_recovery.shfor qdrant backup and restore and its documentation.qdrant-backup-restore/k8s/configmap-script.yamlwhenqdrant-backup-restore/qdrant_backup_recovery.shchanges.