publications:synology_trigger_hyper_backup_on_usb_connect
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
publications:synology_trigger_hyper_backup_on_usb_connect [2020/01/08 19:43] – [Preconditions] Maik Wodarz | publications:synology_trigger_hyper_backup_on_usb_connect [2020/01/08 19:47] – [Script startDatenBackup.sh] Maik Wodarz | ||
---|---|---|---|
Line 26: | Line 26: | ||
====== Overview - general workflow ====== | ====== Overview - general workflow ====== | ||
* Create a cron job which checkt peridically a predefined file system location for existence of a flag file. (I’ll call it trigger file) | * Create a cron job which checkt peridically a predefined file system location for existence of a flag file. (I’ll call it trigger file) | ||
- | * Create an USB copy job using USB-Copy app from Synology, which copies a trigger file from a just connected USB drive to predefined location on NAS. | + | * Create an USB copy job using //USB-Copy// app from Synology, which copies a trigger file from a just connected USB drive to predefined location on NAS. |
* When the cron job finds the trigger file and there is still no active job (activity file) | * When the cron job finds the trigger file and there is still no active job (activity file) | ||
* Remember that a job is active => create the activity file (using touch) | * Remember that a job is active => create the activity file (using touch) | ||
Line 38: | Line 38: | ||
====== USB-Copy ====== | ====== USB-Copy ====== | ||
- | Originaly the USB-Copy app from Synology is intendet to do simple jobs like “copy file from USB drive to NAS” or “copy files from NAS to USB drive” when the copy button is pressed or a specific backup medium is detected. (UUID) It has to be installed by Synology package center. | + | Originaly the //USB-Copy// app from Synology is intendet to do simple jobs like “copy file from USB drive to NAS” or “copy files from NAS to USB drive” when the copy button is pressed or a specific backup medium is detected. (UUID) It has to be installed by Synology package center. |
Actions caused by copy button are affecting only the fron USB port while USB detecting actions are working for the back site USB ports as well. | Actions caused by copy button are affecting only the fron USB port while USB detecting actions are working for the back site USB ports as well. | ||
Line 56: | Line 56: | ||
/ | / | ||
| | ||
- | The USB-Copy program lets beep the NAS after connecting twice. | + | The //USB-Copy// program lets beep the NAS after connecting twice. |
After finishing the trigger file it beebs again twice. | After finishing the trigger file it beebs again twice. | ||
Line 78: | Line 78: | ||
So it is possible to connect the second backup drive a bit later or even in the same moment. The backups are handled serial. | So it is possible to connect the second backup drive a bit later or even in the same moment. The backups are handled serial. | ||
- | What happens when a trigger counter is bigger than Zero?: | + | What happens when a trigger counter is bigger than zero?: |
* Create activity file (using touch command) | * Create activity file (using touch command) | ||
* Remove all entries in trigger folders: | * Remove all entries in trigger folders: | ||
Line 144: | Line 144: | ||
====== Synousbcopy ====== | ====== Synousbcopy ====== | ||
- | ''/ | + | ''/ |
- | What can synousbcopy do for us? | + | What can '' |
/ | / | ||
Shows the help. | Shows the help. | ||
Line 160: | Line 160: | ||
====== Script startDatenBackup.sh ====== | ====== Script startDatenBackup.sh ====== | ||
- | This script or the corresponding counterpart startMediaBackup.sh is the heart of the trigger process. | + | This script or the corresponding counterpart |
It does the following: | It does the following: | ||
* activate copy LED blinking | * activate copy LED blinking | ||
- | * triggers hyper backup task | + | * triggers |
* waits until the hyper backup task finishes. | * waits until the hyper backup task finishes. | ||
* Deactivates the copy LED | * Deactivates the copy LED |
publications/synology_trigger_hyper_backup_on_usb_connect.txt · Last modified: 2022/05/01 11:01 by Maik Wodarz