Skip to content

Instantly share code, notes, and snippets.

@kevinmilner
kevinmilner / synology_surveillance_usb_archiver.sh
Created July 28, 2017 23:38
Synology Surveillance Station USB storage archive workaround cron job
#!/bin/bash
# Synology Surveillance Station doesn't let you store recordings on USB storage, which means that you must
# use the internal (often mirrored) disks. This is less than ideal. Unfortunately, just symbolically
# linking the surveillance store directory to one on USB storage causes surveillance station to fail after
# a day or so. This workaround still uses your main storage for recording, but moves older files to USB storage
# for archival. The moved files themselves are symbolically linked back to the original storage location.
#
# Script should be run regularly, either by editing /etc/crontab or through Synology's built in script scheduling.
# Be sure to edit the user inputs below, and set up SS to keep recordings for longer than the external archive period.