Backup plugin (using rsnapshot) for 0.5

  • Hi,
    i was missing a real backup solution in OMV, so i started working on it as a plugin for OMV 0.5


    My plugin uses rsnapshot to create periodical incremental backups of any shared folder to any other shared folder.


    It does NOT backup your system drive!
    There is a plugin available through OMV-Extras called openmediavault-backup. This backs up your system drive. If you have problems with the restore, create a thread.
    So this plugin here ONLY backs up your shared folders! Understood? Then go ahead.



    Rsnapshot uses hardlinks for this, making each backup appearing complete while still saving disk space when files didn't change between backups.
    You can easily browse backups through SMB/NFS share access, they will appear in directories like "daily.0", "daily.1" and so on, while "daily.0" is the most-recent one.


    You can define how many hourly, daily, weekly, monthly backups you want to keep until the oldest is removed automatically.
    This also sets the up intervals you need: e.g. if you don't want hourly backups, set hourly to 0


    Rsnapshot has one limitation, though: it doesn't support remote backup targets. It would be possible to support remote sources, however.


    I recommend to use this only in testing environments, as i didn't spent much time to test it.
    Especially in the specified backup target dir, directories and files are created, so use an empty folder as target to be safe.


    Source and Plugin .deb available on github


    Update: Plugin is now available in the omv-extras repository (Thanks ryecoaaron)


    I'd be happy to know if it works for you (or if it doesn't).


    Screenshots:


    Note that the next one shows MANUAL execution only. Backups are also executed automatically.

  • It looks like you have developed a routine to backup the data drives. Please correct me if I'm wrong. Since it was developed for 0.4.xx does it show up in the GUI for
    user setup? Some screenshots would be nice. As you may know the API for plugins was rewritten for 0.5.xx this unfortunately means it will require updating to make it compatible with 0.5.xx.


    On your github page could you please show what version of OMV your plugin is for.


    To back up the system drive we recommend using Clonezilla. Simply because it backs up the entire drive, partitions included. Makes it easy to restore OMV to another drive if need be.


    Take Care

    • Offizieller Beitrag

    Definitely looks like it is for 0.5 looking at the code quickly and the title says "for 0.5" :)

    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!

  • I may have misunderstood when he mentioned testing and production systems.

  • As you were not the only one misunderstanding the version it was made for, i edited the first post :)
    And yes, this is intended to backup your data, not your system (for which i clone the whole drive, too).
    I think the only way to force yourself to make periodic backups is when they happen automatically.


    I also included 2 screenshots now.
    Feel free to ask any other questions, i may have been unclear on more topics.

  • julakali


    Would you mind if ryecoaaron adds this plugin to the new omv plugin repo?


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • mbourd25: A NFS-mounted target directory would work.
    If you're talking about a remote ssh or smb target: Nope, I'm sorry. rsnapshot itself doesn't support network targets. There are some workarounds, but all require configuration on the target. See http://www.rsnapshot.org/faq.html .


    Rsnapshot supports to use network sources however. In this case, you will have a backup server and some clients (which are backed up), on which ssh and rsync must be running. Maybe i'll add an option for this in the future.


    davidh2k: sure, is there a way how i can push updates to that repo?

  • I don't know, but I'll let Volker invite you to the Developer Group, that makes it easier ;)


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

    • Offizieller Beitrag
    Zitat von "julakali"

    is there a way how i can push updates to that repo?


    You can send me a message when you change something and I can add it to the repo. I'm still new with running the repo and not ready for multi-user yet :)

    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!

  • Sounds like a legit method for updates to me :D


    Zitat von "ryecoaaron"


    You can send me a message when you change something and I can add it to the repo. I'm still new with running the repo and not ready for multi-user yet :)

    • Offizieller Beitrag

    Something in your Jobs.js if doing something OMV doesn't like. On a fresh install, all I get is a white screen after pressing reload (in multiple browsers with cache cleared). It installs fine and doesn't generate an error even when running engined in debug mode. When I remove Jobs.js, everything works again. Ran Jobs.js through jsfiddle and code is ok.


    ps - when I remove the OMV.module.admin.service.rsnapshot.Job section and the required line in Jobs, it works.


    pps - found it. Need to remove the "OMV.form.field.GroupComboBox" from:


    Code
    Ext.define("OMV.module.admin.service.rsnapshot.Job", {
            extend: "OMV.workspace.window.Form",
            requires: [
                    "OMV.data.Store",
                    "OMV.data.Model",
                    "OMV.data.proxy.Rpc",
                    "OMV.form.field.SharedFolderComboBox",
                    "OMV.form.field.GroupComboBox"
            ],

    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

    I changed the code and rebuilt the package ( incremented version to 0.5.1).


    ps make that 0.5.2. I had to run dos2unix on all of the files?? I was editing them in Linux and even when I edit other files, I've never had that problem.

    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!

  • I don't get why the "OMV.form.field.GroupComboBox" is a problem, since the GroupComboBox is used in Jobs.js.
    Also, it works on my machine - fresh installed OMV 0.5, but i updated it to the latest version. Tried that?


    I'm running linux aswell.


    Code
    var/www/openmediavault/js/omv/module/admin/service/rsnapshot $ file Jobs.js 
    Jobs.js: ASCII text


    This output means: unix file endings.


    Zitat von "ryecoaaron"

    I changed the code and rebuilt the package ( incremented version to 0.5.1).


    ps make that 0.5.2. I had to run dos2unix on all of the files?? I was editing them in Linux and even when I edit other files, I've never had that problem.

    • Offizieller Beitrag

    I tried on one existing machine and two fresh installs all running 0.5.11 with the same results. In each instance, removing the line worked. It doesn't make sense to me either.


    The dos2unix thing must be my fault then - new to github. Either way, I hope it is working everywhere now :)

    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!

  • Zitat von "tekkbebe"

    julakii, I had you added to developers section of forum, in case ryeco hasn't requested it yet. you should see new section of the forum within a day.


    I already sent Volker a PM about him.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

Jetzt mitmachen!

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