Mounted BorgBackup Repos with mangled archive name on Windows using Samba

  • Hello everyone!


    BorgBackup is configured and does its job without any problems. But I would like someone to help me with one little thing.


    In the BorgBackup plugin, when adding an archive, we give it the Name/Prefix and other configuration parameters. The plugin then generates a job in /var/lib/openmediavault/borgbackup/daily.d/borgbackup* where the current time is added to the prefix with -{now}, giving each newly created archive a unique name.

    Example: backup-2020-09-12T03:33:03


    This is all well designed, but on Windows the file must not have the character ":" in its name, so when I Mount this Repo on Windows via Samba it comes up with a mangling of the archive name. The archive now gets its name on Windows via Samba: BQZUVF~T. Everything works, but it is difficult to recognize the name of the archive.


    Is there any way to simply avoid this mangling archive names? Is it possible to easily define a new way of creating a archive name?


    If you want to suggest me to set "mangled names = yes" in the Samba configuration, that's not the solution for me, because then I can't access the rest of the archive.


    Thanks in advance to everyone for the advice.

    • Offizieller Beitrag

    Is there any way to simply avoid this mangling archive names?

    I will look into it but {now} is a borgbackup function. So, I will probably have to write my own code to replace it.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    Changed in 5.1.4. It will look like the following now: Archive name: datetest-18-Sep-2020_06-03-56

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • What else to say but THANK YOU for the quick response.


    This proposed change suits me, although I would suggest using format datetest-2020-09-18_06-03-56 instead of datetest-18-Sep-2020_06-03-56 for easier sorting by name when there are many archives in Repo.


    Code
    -{now:%Y-%m-%d_%H-%M-%S}


    And once again, Thank you very much!

    • Offizieller Beitrag

    his proposed change suits me, although I would suggest using format datetest-2020-09-18_06-03-56 instead of datetest-18-Sep-2020_06-03-56 for easier sorting by name when there are many archives in Repo.

    Done. 5.1.5 in the repo.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • GrimDeWitt

    Hat das Label gelöst hinzugefügt.
  • Hi all,


    first of all a big thank you for the time you are investing into this plugin! I am new to openmediavault and currently experimenting with the best setup. I have updated to the most recent version today (5.5.21) with the BorgBackup plugin at v5.1.6


    Version 5.1.6 should include the fixes described above. However, my backups are still named with the default {now} timestamp including ":" as separator for the timestamp. And I am experiencing exactly the same problem as GrimDeWitt, mounted archives shared over SMB are not displayed properly on a Windows client.


    Here is what I do to create a backup: I press the play button in the Archive list of the BorgBackup plugin's UI. The output of the executed command shows that {now} is being used instead of the custom format proposed by GrimDeWitt (see attached screenshot).



    I am not familiar with salt so I have no idea when which code is executed, but in the master branch in the GIT repo I found that borgbackup.inc line 402 is not updated to the custom format.

    Code
    $cmdArgs[] = sprintf('"%s::%s-{now}"', $path, $archive->get('name'));

    I didn't run scheduled backups yet. Could there be a difference between manual execution of backups and scheduled backups?


    Thanks for your help!

    r-atom

  • Hello everyone,


    So far I only use scheduled backups and they work perfectly. Now I also tried a manually started backup. The same thing happens to me as the r-atom described.


    Could there be a difference between manual execution of backups and scheduled backups?


    The difference is there, the scheduled backup generates the name well, while when you start the backup manually it seems to remain the old name format.


    Done. 5.1.5 in the repo.


    I would also ask ryecoaaron to correct the way the file name is generated in a manually started backup.


    Once again, thank you, ryecoaaron.

    • Offizieller Beitrag

    I would also ask ryecoaaron to correct the way the file name is generated in a manually started backup.

    5.1.7 in the repo.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!