-
Notifications
You must be signed in to change notification settings - Fork 187
Description
Proposal:
Add examples demonstrating how to use the BackupService
and RestoreService
as they are both currently undocumented.
Current behavior:
Examples are missing apart from brief comments in the source code.
Desired behavior:
It would be nice to have examples demonstrating how to use both services, possibly in the examples
directory or in the README. Personally, I would like to use BackupService
and RestoreService
to perform migrations but am unsure how to use these services.
Alternatives considered:
Other alternatives to the BackupService and RestoreService is using the Influx CLI with Python subprocess calls, but this is less testable and not preferred.
Use case:
Performing backups or restores using the InfluxDB Python client would be much easier with documentation.
Activity
bednar commentedon Nov 28, 2023
Hi @trevorbonas,
Thanks for using our client.
Is this something you would be willing to help with? All PR is welcome and we will be happy to review your submission.
Regards
trevorbonas commentedon Nov 28, 2023
@bednar I would love to but:
I don't know how to use these services correctly.
I get errors with
BackupService
:Platform: macOS Sonoma 14.1.1 Apple M1 Max.
Python version: 3.11.6.
influxdb-client-python version: 1.38.0.
InfluxDB version: OSS 2.7.4.
Reproducible code:
Error:
When the hardcoded value in
influxdb_client/_sync/rest.py
is changed fromutf8
tolatin1
then this error occurs:Argument values for
get_backup_metadata_with_http_info
have no effect re: the errors.Let me know whether my usage is correct, whether you have any tips for getting
BackupService
working, or whether I should make a separate issue for these errors.lenoqt commentedon Mar 13, 2024
The library is badly outdated it seems, I am trying to restore a bucket and using
RestoreService.post_restore_bucket_id
returns the following error, and then further checking on my server, the endpoint that is pointing to this method, doesn't exists. The other methods for restoring or taking backups also don't work, I switched to the golang version and it looks that one is up to date.