Posts by erbsenzaehler

    Ich bin noch ganz am Anfang mit NAS und einer ordentlichen Backup-Strategie, aber werde auf Borgbackup setzen.

    Irgendwann lösche ich etwas aus versehen und dann ist es weg. Das wäre nicht gut. Anderes Scenario wäre Virus, Verschlüsselung der Daten etc... Da hab ich den Artikel gefunden (hier) zu einer halbwegs sicheren Variante mit offsite-Backup und einer relativ strikten Einstellung für die Sicherung. Ein kleines, billiges NAS mit einer externen Festplatte würde ich bei meiner Familie platzieren. Das würde relativ viele Scenarios für Datenverlust absichern.

    Nur ist das mit dem SSH Kommandos über die OMV GUI nicht möglich und man muss das selbst machen und aufpassen, dass man es so macht, dass OMV die Einstellungen nicht wieder überschreibt.

    The setup you posted considers the archive as being weekly because of the first nonzero number from top to bottom (hourly, daily, weekly, monthly, yearly) being weekly 3. The weekly backups are being created on monday at starting hour + 1h. 3 of those weekly backups are retained.

    Monthly jobs start on the first of every month.

    Yearly jobs start on the first of January.

    The times in the wiki are in 24h notation, so 4 means 4 am. The code below is the template for the cronjobs for borgbackup.


    Log in to the server via ssh and alter the environment variable as described in the omv documentation, that way seems to be more elegant. Then do the omv-salt stuff as described in the screenshot of the omv-extras wiki.




    Minor issue with the update to the plugin. The code you altered for the basedir handling generates a string that cannot be interpreted by the cd command. I removed the " around the %s and that creates a working command.


    $cmdArgs[] = sprintf('cd "%s" && ', escapeshellarg($basedir));

    to

    $cmdArgs[] = sprintf('cd %s && ', escapeshellarg($basedir));

    If the basedir has a typo in it then some directory will be created, that might not be intended. From an outsider view I would expect archive creation to not create anything and it be only a read operation (apart from writing in the repo).


    For me as a user I would rather have it fail then do something I didn't intend. (my opinion)




    I forgot to thank you for your dedication to this project in my first post. I am amazed at what interesting software is open source and how much time people put into developing and maintaining it.

    Attached are the diffs for only the basedir fixes and for both basedir fixes and introducing a dry run command. I added the output of the borg command to the $bgOutputFilename in the exec() statement so the results from the borg command are visible in the popup.


    I am not sure if there should be additional logging to the $bgOutputFilename before throwing the exception when basedir is specified but does not exist.

    Hey,

    I noticed the same behavior as cosmicvoyager when trying to set up borgbackup for my (first) omv server. I looked into the source code and noticed that the basedir handling has some flaws. It's missing in the borgbackup.inc file in /engined/rpc and the cron job doesn't exit, if the basedir is specified but does not exist.


    I edited a few lines of code and that seems to work. I do not have github account but could send git patches if that's okay.


    sidenote: I added a dry-run option in the UI for people to check their config before actually creating archives through UI/cron. If that is of interest then I could send that too.


    I am no programmer so my code may not look the best but I tried to recreate the style of what's currently in the files.