Skip to content
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

NPBACKUP cannot connect repo when it has already initialized #46

Open
GaLbiHU opened this issue Dec 29, 2023 · 4 comments
Open

NPBACKUP cannot connect repo when it has already initialized #46

GaLbiHU opened this issue Dec 29, 2023 · 4 comments

Comments

@GaLbiHU
Copy link

GaLbiHU commented Dec 29, 2023

I have been using restic for a long time and I would like to attache npbackup to restic's repository. I configured the program, but it run into an error: Not connected to repo.
Here is debug information:

2023-12-29 20:53:14,741 :: INFO :: Runner took 1.027485 seconds
2023-12-29 20:53:14,742 :: INFO :: Searching for a backup newer than 1 day, 0:00:00 ago.
2023-12-29 20:53:14,742 :: DEBUG :: Running command: ["C:\Users\xxxx\AppData\Local\Temp\2\onefile_4416_133483531920371038\npbackup\restic.exe" init --repository-version 2 --compression auto]
2023-12-29 20:53:14,744 :: DEBUG :: Setting envrionment variable "AWS_ACCESS_KEY_ID"
2023-12-29 20:53:14,744 :: DEBUG :: Setting envrionment variable "AWS_SECRET_ACCESS_KEY"
2023-12-29 20:53:14,746 :: DEBUG :: Setting GOMAXPROCS to 6
2023-12-29 20:53:15,117 :: DEBUG :: Command ""C:\Users\xxxxxxx\AppData\Local\Temp\2\onefile_4416_133483531920371038\npbackup\restic.exe" init --repository-version 2 --compression auto" returned with exit code "1". Command output was:
2023-12-29 20:53:15,117 :: DEBUG :: STDOUT: Fatal: create key in repository at s3:https://xxxxx.wasabisys.com/xxxxxxxxx failed: repository master key and config already initialized
2023-12-29 20:53:15,124 :: DEBUG :: Running on_exit callable.
2023-12-29 20:53:15,125 :: ERROR :: Cannot connect to repository or repository empty.
2023-12-29 20:53:15,126 :: INFO :: Runner took 0.383868 seconds

It seems to me the npbackup tries to initialize the repo but it run into an error. Is it possible to disable this function?

deajan added a commit that referenced this issue Dec 29, 2023
@deajan
Copy link
Contributor

deajan commented Dec 29, 2023

The program checks whether repo is already initialized by trying to init it. If it gets something like already init as return value from restic, it consideres that the repo is okay.
Culprit here was I think that restic init output is different between a S3 and a REST server. I've made a quick commit on master for this.

How do you use NPBackup ? via pip ? prebuilt executables ?

@GaLbiHU
Copy link
Author

GaLbiHU commented Dec 29, 2023

I use lates version of prebuilt executable.

@deajan
Copy link
Contributor

deajan commented Dec 29, 2023

Okay. Cannot release new binaries until next year.
I am also currently doing a big redesign of NPBackup which will require a new configuration file format.
I hope to have a new release by mid-january.

If you're not in hurry, I would advise to wait for release 2.3.0, which will have a huge lot of improvements.

@GaLbiHU
Copy link
Author

GaLbiHU commented Dec 29, 2023

Thanks, I can wait next release of the program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants