Files
teslausb/run/rsync_archive/archive-clips.sh
Gocnak 636b1a1819 Disregard copying perms to catch another edge case
Pesky, was caught up trying to copy permissions over and didn't really need to
2018-10-29 01:38:38 -04:00

17 lines
437 B
Bash

#!/bin/bash -eu
log "Archiving through rsync..."
source /root/.teslaCamRsyncConfig
num_files_moved=$(rsync -auzvh --no-perms --stats --log-file=/tmp/archive-rsync-cmd.log /mnt/cam/TeslaCam/saved* $user@$server:$path | awk '/files transferred/{print $NF}')
/root/bin/send-pushover "$num_files_moved"
if [ $num_files_moved > 0 ]
then
log "Successfully synced files through rsync."
else
log "No files to archive through rsync."
fi