FEATURE REQUEST - Improvements to the USB Backup Plugin

    • OMV 1.0
    • FEATURE REQUEST - Improvements to the USB Backup Plugin

      Hi,

      I am having some issues with the USB Backup plugin and it's reliability.

      When using it, on many occasions the drive is not correctly mounted and therefore the backup fails.

      I am trying to use this for some users who aren't very tech savy, so having to access the web interface, mount the drive manually is not an option.


      Presently, I have been doing some testing, and once the Rsync job has completed, if you just yank out the drive after a few minutes I can often get the following errors

      Aborting journal on device sdf1-8
      I/O error detected when updating journal superblock for sfd1-8
      EXT4-fs error couldn't clean up the journal
      remounting as read only

      The next time the drive is plugged in, it often fails to mount or mounts as read only

      If I manually unmount the drive before removing via the web interface, the process is much more reliable, but defeats the purpose of an automated solution


      I would like to request some improvements to the way it works such as this workflow

      - Plug in USB drive
      - USB drive is automounted and rsync runs based on the configuration
      - An email is sent indicating that the Drive has been detected, mounted and the Backup has started
      - Rsync runs, and completes
      - The drive is automatically unmounted, this helps to make sure the drive is clean, and avoids I/O errors on removal
      - An email is sent to an address indicating the process has finished, and that the drive can be safely removed from the system

      This means any user can plug in a drive, wait for a start and finish email, and then unplug the drive, meaning the entire process is automated and very very simple, as good as synology.
    • Another FR:
      #1:
      don't display all HDDs in "Device", only the USB ones, as the Plugin is called "USB-Backup".


      If the backing up to internal drives is intended, then the plugin-name is confusing IMO. It should be called "shared-folder-backup" or something like this AND a mail should be sent, when the backup is completed. Think of very large backup-jobs on drives with >=2TB.
      "shared-folder-backup" is a better name, so the users know, what the plugin is doing -> it can backup shares to internal or external drives.
      In omv-extras we have a "backup"-plugin already which backs up the system folder.

      #2:
      extend omv-helper-functions with a mail-function, which can be used from bash by other plugins without implementing their own: see _send_email() here as an example.
      like this:
      omv-send-mail $PLUGINNAME $SUBJECT < $MAILTEXT
      then OMV should send the mail to the users setup in OMV.
      Don't know, if a function like this extists already :/

      Edit: created a FR on our Tracker: bugtracker.openmediavault.org/view.php?id=1180
      "Glowing days. Don't cry because they are over. Smile because they happened." - Confucius

      Server: 1x 32GB SSD (system) - 5x 2TB Data - 1x 2TB Snapraid-Parity - latest OMV 1.x
      No Support through PM
      Tutorials --- Howto install OMV-Extras --- Upgrade/Update-Problems --- If autoshutdown doesn' -work

      The post was edited 2 times, last by Solo0815 ().

    • StylusPilot wrote:

      - Plug in USB drive
      - USB drive is automounted and rsync runs based on the configuration
      - An email is sent indicating that the Drive has been detected, mounted and the Backup has started
      - Rsync runs, and completes
      - The drive is automatically unmounted, this helps to make sure the drive is clean, and avoids I/O errors on removal
      - An email is sent to an address indicating the process has finished, and that the drive can be safely removed from the system


      Everything is already implemented. Activate the email by checking the 'Send email' checkbox.

      Solo0815 wrote:

      Another FR:
      #1:
      don't display all HDDs in "Device", only the USB ones, as the Plugin is called "USB-Backup".


      If the backing up to internal drives is intended, then the plugin-name is confusing IMO. It should be called "shared-folder-backup" or something like this AND a mail should be sent, when the backup is completed. Think of very large backup-jobs on drives with >=2TB.
      "shared-folder-backup" is a better name, so the users know, what the plugin is doing -> it can backup shares to internal or external drives.
      In omv-extras we have a "backup"-plugin already which backs up the system folder.

      #2:
      extend omv-helper-functions with a mail-function, which can be used from bash by other plugins without implementing their own: see _send_email() here as an example.
      like this:
      omv-send-mail $PLUGINNAME $SUBJECT < $MAILTEXT
      then OMV should send the mail to the users setup in OMV.
      Don't know, if a function like this extists already :/

      Edit: created a FR on our Tracker: bugtracker.openmediavault.org/view.php?id=1180

      #1 Some time ago a user commited a patch to add eSATA devices. Maybe we can remove this now due the fact that the OMVStorageDeviceAbstract::isUSB method is more powerful and should idenify such external HDD devices too. But we have to validate this before. I have no eSATA devices, so this must be done by someone else.

      #2 This is not necessary to add such a function. Simply use

      Source Code

      1. echo "test test" | mail -s "subject test" root


      to send an email to the root user and finally to the primary email address.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • gwaitsi wrote:

      - unmounting of the drive should be an option and not by default without any control.

      No, the USB device MUST be unmounted by the generated script, otherwise the device will not be unmounted correctly.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • You have to decide this on your own. But the USB backup script should always unmount the USB device after the rsync job has been finished because onl ythe script knows the exact point in time when to do that. Also this makes sure the filesystem is consistent.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit