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

Impossible to initialize/prepare repository on a restricted borg server #96

Open
dymitar opened this issue Oct 16, 2024 · 3 comments
Open
Labels
help wanted Extra attention is needed

Comments

@dymitar
Copy link

dymitar commented Oct 16, 2024

Hi,
You are trying to prepare a repository the same way you are preparing a client, with following commands (or similar):

ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null <remoteborgserver> "mkdir -p /tmp/cyborgbackup_89_7zkflhhx" && scp -qo StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null /tmp/tmphccj99n6 /tmp/tmpfeosgp3j <remoteborgserver>:/tmp/cyborgbackup_89_7zkflhhx/ 
&& rm -f  /tmp/tmphccj99n6' /tmp/tmpfeosgp3j 
&& ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null <remoteborgserver> ". /tmp/cyborgbackup_89_7zkflhhx/tmpfeosgp3j && rm /tmp/cyborgbackup_89_7zkflhhx/tmpfeosgp3j && /tmp/cyborgbackup_89_7zkflhhx/tmphccj99n6 ; exitcode=$?; rm
  -rf /tmp/cyborgbackup_89_7zkflhhx ; exit $exitcode" 
rm /tmp/tmphccj99n6 /tmp/tmpfeosgp3j

This is impossible on borg servers like Hetzner for example, they don't allow you to execute the commands in the transferred script.
I understand the reason to try to implement repository preparation on a remote linux server, but I cannot completely understand the logic in the code and the steps.
I can easily init a repository on hetzner server with borg init and after that it is completely working. The same I can do on my own remote borg server.
I'm not a specialist in borgbackup, Can you please explain the reason for these commands and what would be the approach to use your very good application with this kind of servers?
The application, including the UI is very good and would save us a lot of manual work.
Kind regards

@GaetanF
Copy link
Collaborator

GaetanF commented Oct 24, 2024

Hello,

CyBorgBackup have been designed to be used from scratch. They will try to "borg init" for each repository configured. For the moment, they hasn't any option for set a repository as ready from the UI or the API.
But you can do that directly in DB => "UPDATE FROM main_repository SET ready=true WHERE id=##ID##"

Regards,

@dymitar
Copy link
Author

dymitar commented Oct 24, 2024

Hi,
This would do the job for the moment.
I will try do do something with the scripts template and the python part as well, and if it works I will share the result.
Another related question - currently I'm using the installation with the debian package and everything is working as expected. But I think it installs V0.5. Do you think it is better to upgrade to development to make the tests and adjustments there? If yes, do you have some recommendation how to upgrade currently installed to development? Or how to install the development, including UI from scratch (not with docker, I tried and there were too many issues)?

@GaetanF
Copy link
Collaborator

GaetanF commented Oct 28, 2024

Hello,

For the development, I use the docker version to work on the features. But for try the workflow, I use a development server with the stack to test the Borg system correctly. (The Docker Borg Worker can have some issue to connect on some client) You can find the development deb package on the Github Workflows Artefact

Regards

@GaetanF GaetanF added the help wanted Extra attention is needed label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants