You might want to reconnect an ejected USB backup drive prior to a new backup. This is helpful if you have staff swapping out disks, as it ejects on job completion and reconnects prior to your backup task running with HyperBackup.
First in the SSH cli run lsusb and find the device you wish to reconnect.
Create a script on share you've created on the Synology, in this example our share is called "IT" and we are using volume1 for our share/script location. The script will only contain a single command. Unfortunately, you cannot simply use this included command line in a schedule task. Important: Only use share locations otherwise you may lose your script on DSM upgrades, etc.
While in SSH in the Synology:
cd /volume1/IT (change to match your desired volume and share)
mkdir synoscripts
cd synoscripts
vi reconnect.sh
Press i (to insert)
Paste in this command.
for scsi_host in /sys/class/scsi_host/host*/scan; do echo "- - -" > ${scsi_host}; done
Press ESC
Press :
Type wq (write and quit)
By default this file will be executable. Simply schedule a task in the Synology task scheduler like below. You'll need to change the password to the account you are scheduling the task with.
sudo -S <<< "account-password-here-that-you-are-scheduling-the-task-with" /volume1/IT/synoscripts/reconnect.sh