BorgBackup migration from OMV4 to OMV5

  • I've been successfully using borgbackup repos on OMV4 and switching these over to OMV5 is my last task before completing the migration. The problem is that the plugin in OMV5 does not want to create a repo using the existing shared folder because it's not empty. Is there a workaround for this?

  • Did you uninstall the plugin before migrating? If you did (shouldn't have), you will have to use an empty folder. I don't know how to get borg to use an existing folder when trying to make a new repo.

    omv 5.5.5 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.5
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • No, this is a completely separate instance, I have OMV running in VMs, one for OMV4 and a second for OMV5. It was my understanding there wasn't an upgrade path from OMV4 to OMV5, so thats the route I took.


    Is there a way to add the existing data into a new repo after it's created? It'd be an extra step, but better than loosing it I guess.

  • t was my understanding there wasn't an upgrade path from OMV4 to OMV5, so thats the route I took.

    Not official but - RE: OMV 5.0 - finally out! :-)


    Is there a way to add the existing data into a new repo after it's created?

    Maybe not the plugin but I would think borg could still access the data

    omv 5.5.5 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.5
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • niemer

    Added the Label resolved
  • I'll just use it through the command line from here on out

    I don't use borg myself. So, if you can think of a way to improve the plugin, suggest it. But since I don't use it, I don't come up with these things on my on. If you know how to use an existing folder, maybe I can make the plugin do that.

    omv 5.5.5 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.5
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I guess my first suggestion would be add the ability to import existing repos.


    Secondly, it would be best if the plugin used absolute paths rather than creating a shared folder for the repos. If any operations are done via the command line using the absolute path to the repo, rather than the shared folder path, the path in where borg looks for the repo is updated and the plugin doesn't know how to handle it.

  • I guess my first suggestion would be add the ability to import existing repos.

    I already guessed that. I need command line workflows to translate into how the plugin works.


    Secondly, it would be best if the plugin used absolute paths rather than creating a shared folder for the repos. If any operations are done via the command line using the absolute path to the repo, rather than the shared folder path, the path in where borg looks for the repo is updated and the plugin doesn't know how to handle it.

    One of the main concepts of OMV is using shared folders. None of the plugins are written with using the command line in mind. That said, shared folders are translated into absolute paths. All I can guess is you are still using the /sharedfolders bind mount that is now disabled by default.


    That ist the point. You need to skip creating the repo.

    The user needs to be able to chose between creating an selecting an existing repo.

    I understand borg well enough to write the plugin. I don't need noob instructions. When I wrote the plugin, things created from the command line weren't something I thought people would use.

    omv 5.5.5 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.5
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I already guessed that. I need command line workflows to translate into how the plugin works.

    There's nothing extra needed using the command line to access an existing repo, I think all the plugin would need is the location of it to work. like Henfri said, there needs to be an option to use existing as well as create new.

    Quote from ryecoaaron

    One of the main concepts of OMV is using shared folders. None of the plugins are written with using the command line in mind. That said, shared folders are translated into absolute paths. All I can guess is you are still using the /sharedfolders bind mount that is now disabled by default.

    The original repos were created in OMV4, so going forward into OMV5 this may not be an issue any longer.

  • OK, I will shut Up.

    Good luck.

    I didn't tell you to shut up. I just asked not to state the obvious like I have no clue what I am doing. I could easily add what I think is right but if that is different than borg users expect then I would have to redo it (and I don't have time to do that).

    omv 5.5.5 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.5
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Hello,


    I can only tell you the obvious and you should consider that the obvious is the answer.

    And as you do not say why my answer is wrong/not applicable in your view, I cannot help further.


    You write

    Quote

    don't know how to get borg to use an existing folder when trying to make a new repo

    And this is the problem: you should not create a new repo. You should just skip the step of creating a new one in case the user already has a repo. In that case, Borg will just use that.


    I could easily add what I think is right

    You could state that and then you would get feedback.

    But you just ask not to state the obvious. How shall we do that, if we don't know what you deem obvious and also not, what you think is wrong with the obvious.


    Greetings,

    Hendrik

  • you do not say why my answer is wrong/not applicable in your view, I cannot help further.

    In the post you quoted, I specifically asked for command line workflows. I thought that was specific enough.

    I will try to make it clear since I'm the one not stating the correct things...


    From the plugin database, I *have* to create a repo. I understand that the plugin does not need to execute the borg create command BUT the plugin should NOT just create the database entry and assume all is good. What I was looking for is command line workflows (where applicable) to the following:


    • does an import button make more sense than just auto-detecting that a repo exists in the folder you choose (leaving the create button identical to what it is now).
    • what if the repo is an older version and needs a borg upgrade run
    • how do I determine if the repo has a passphrase
    • how do I determine if the repo is encrypted
    • how do I determine if the repo is actually a valid borg repo and not in some bad state.

    omv 5.5.5 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.5
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Hello,


    I understand. Thank you.

    I recommend running

    Code
    borg list /path/to/repo

    This will return a list of backups


    Or better

    Code
    borg info /path/to/repo   


    If a passphrase is needed, it will ask:


    Code
    Enter passphrase for key /path/to/repo

    And then answer


    If you add --json to the command, you will get a more suitable output.



    Greetings,

    Hendrik

  • If a passphrase is needed, it will ask:

    I think an import button is the best way to go. Since any action to get info about a repo will require a passphrase if one is enabled, the user will have to know to supply it. I will see what I can come up with.

    omv 5.5.5 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.5
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I think an import button is the best way to go. Since any action to get info about a repo will require a passphrase if one is enabled, the user will have to know to supply it. I will see what I can come up with.

    It's not just a passphrase, but a passphrase and a key. When borg asks for those it automatically creates the directory for the key(s) and tells the user where it's located, those key(s) need to somehow end up in that directory.

  • It's not just a passphrase, but a passphrase and a key. When borg asks for those it automatically creates the directory for the key(s) and tells the user where it's located, those key(s) need to somehow end up in that directory.

    Isn't the key (keyfile?) for encryption? Either way, the plugin doesn't store any directories for keys. I just assume the borg binary "knows" where to find those based on the path passed?

    omv 5.5.5 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.5
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Version 5.1 of the borgbackup plugin is in the repo. This allows you to skip the borg init command to use an existing repo. If you check the skip init checkbox, it will run borg check --repository-only --info using the information supplied. If it is wrong, the check command will fail and you will be allowed to edit the info..

    omv 5.5.5 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.5
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!