USB Backup / external enclosure

  • I'm going to use USB Backup plugin to regularly backup data to 4TB WD HDD installed in Ugreen USB3 enclosure. Here is some information about it:

    ID 174c:55aa ASMedia Technology Inc. Name: ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge


    I have a few questions around that.

    1. My enclosure has a pre-set to spin-down a disk after some inactivity period (few minutes). Should I leave it as it is or try to change this behavior?

    2. I want the sync happen not only on the disk plug-in, but also on a schedule if the drive remains plugged in.


    For #2 I found the old example from ryecoaaron : USB Backup Settings - Just Stopped Working

    Will give it a try but need to clarify something first. This script is using some id to refer to the external disk partition. I'm not sure which particular id I should use.

    I'm checking on my system and see some id as a part of the script name:

    Code
    # ll /var/lib/openmediavault/usbbackup.d
    total 8
    -rwxr-xr-x 1 root root 1636 May 22 10:53 openmediavault-usbbackup-9be5d73708b375775c28a72exxxxxxxx
    -rwxr-xr-x 1 root root 1061 May 22 10:53 rsync-54dfab8e-e9d1-4b36-a9d7-d3afxxxxxxxx

    However, I was not able to correlate this id with any other id on my system, like UUID, etc. How this id is generated?

  • It is the UUID of the drive reported by blkid. BUT, this script is five years old and needs quite a few changes to work on a current OMV system.

    omv 5.5.1 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.3
    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!

  • What are you trying to match?

    My understanding was that the backup script name [in /var/lib/openmediavault/usbbackup.d/] is based on the drive UUID, this is what I see in your script:


    Code
    # your drive
    drive="854fe912-9f08-423d-9bc8-26a404cae6d0"
    # run backup script
    /usr/sbin/omv-run -e -s 'USB Backup (device=${drive})' -a 'From: USB Backup <root>' /var/lib/openmediavault/usbbackup.d/sync-${drive}"

    I thought that 854fe912-9f08-423d-9bc8-26a404cae6d0 in this example is the UUID of the USB drive, this id is used as a part of the backup script name. With this wrong assumption I was trying to find a match between my disk UUID and my backup script name.

    After some digging I found that it is not a disk UUID but a job uuid found in ${OMV_CONFIG_FILE}. Now I can either mimic some code from usbbackup script or just hardcode this id it in my own script.

  • AndrewZ

    Added the Label OMV 4.x
  • AndrewZ

    Added the Label resolved

Participate now!

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