

Ssmtp < /boot/logs/cronlogs/allshares.log # now add all the other logs to the end of this email summaryĬat BackupNAS_Summary.log Pictures.log Videos.log Movies.log TVShows.log OtherVids.log FamVideos.log Documents.log > allshares.log Tac BackupNAS_Documents.log | sed '/^Number of files: /q' | tac > Documents.log Tac BackupNAS_FamVideos.log | sed '/^Number of files: /q' | tac > FamVideos.log Tac BackupNAS_OtherVids.log | sed '/^Number of files: /q' | tac > OtherVids.log Tac BackupNAS_TVShows.log | sed '/^Number of files: /q' | tac > TVShows.log Tac BackupNAS_Movies.log | sed '/^Number of files: /q' | tac > Movies.log Tac BackupNAS_Videos.log | sed '/^Number of files: /q' | tac > Videos.log Tac BackupNAS_Pictures.log | sed '/^Number of files: /q' | tac > Pictures.log Rsync -avu -stats -numeric-ids -progress -e "ssh -i /root/.ssh/id_rsa -T -o Compression=no -x" /mnt/user/Documents/ > /boot/logs/cronlogs/BackupNAS_Documents.logĮcho "moving to end = $(date)" > /boot/logs/cronlogs/BackupNAS_Summary.log Rsync -avu -stats -numeric-ids -progress -e "ssh -i /root/.ssh/id_rsa -T -o Compression=no -x" /mnt/user/FamVideos/ > /boot/logs/cronlogs/BackupNAS_FamVideos.logĮcho "Copying new files to Documents share = $(date)"Įcho "Copying new files to Documents share = $(date)" > /boot/logs/cronlogs/BackupNAS_Summary.logĮcho "Copying new files to Documents share = $(date)" > /boot/logs/cronlogs/BackupNAS_Documents.log Rsync -avu -stats -numeric-ids -progress -e "ssh -i /root/.ssh/id_rsa -T -o Compression=no -x" /mnt/user/OtherVids/ > /boot/logs/cronlogs/BackupNAS_OtherVids.logĮcho "Copying new files to FamVideos share = $(date)"Įcho "Copying new files to FamVideos share = $(date)" > /boot/logs/cronlogs/BackupNAS_Summary.logĮcho "Copying new files to FamVideos share = $(date)" > /boot/logs/cronlogs/BackupNAS_FamVideos.log Rsync -avu -stats -numeric-ids -progress -e "ssh -i /root/.ssh/id_rsa -T -o Compression=no -x" /mnt/user/TVShows/ > /boot/logs/cronlogs/BackupNAS_TVShows.logĮcho "Copying new files to OtherVids share = $(date)"Įcho "Copying new files to OtherVids share = $(date)" > /boot/logs/cronlogs/BackupNAS_Summary.logĮcho "Copying new files to OtherVids share = $(date)" > /boot/logs/cronlogs/BackupNAS_OtherVids.log Rsync -avu -stats -numeric-ids -progress -e "ssh -i /root/.ssh/id_rsa -T -o Compression=no -x" /mnt/user/Movies/ > /boot/logs/cronlogs/BackupNAS_Movies.logĮcho "Copying new files to TVShows share = $(date)"Įcho "Copying new files to TVShows share = $(date)" > /boot/logs/cronlogs/BackupNAS_Summary.logĮcho "Copying new files to TVShows share = $(date)" > /boot/logs/cronlogs/BackupNAS_TVShows.log

Rsync -avu -stats -numeric-ids -progress -e "ssh -i /root/.ssh/id_rsa -T -o Compression=no -x" /mnt/user/Videos/ > /boot/logs/cronlogs/BackupNAS_Videos.logĮcho "Copying new files to Movies share = $(date)"Įcho "Copying new files to Movies share = $(date)" > /boot/logs/cronlogs/BackupNAS_Summary.logĮcho "Copying new files to Movies share = $(date)" > /boot/logs/cronlogs/BackupNAS_Movies.log Rsync -avu -stats -numeric-ids -progress -e "ssh -i /root/.ssh/id_rsa -T -o Compression=no -x" /mnt/user/Pictures/ > /boot/logs/cronlogs/BackupNAS_Pictures.logĮcho "Copying new files to Videos share = $(date)"Įcho "Copying new files to Videos share = $(date)" > /boot/logs/cronlogs/BackupNAS_Summary.logĮcho "Copying new files to Videos share = $(date)" > /boot/logs/cronlogs/BackupNAS_Videos.log # echo "Waiting for BackupNAS to power up."Įcho To: > /boot/logs/cronlogs/BackupNAS_Summary.logĮcho From: > /boot/logs/cronlogs/BackupNAS_Summary.logĮcho Subject: MediaNAS to BackupNAS rsync summary > /boot/logs/cronlogs/BackupNAS_Summary.logĮcho > /boot/logs/cronlogs/BackupNAS_Summary.logĮcho "Copying new files to Pictures share = $(date)"Įcho "Copying new files to Pictures share = $(date)" > /boot/logs/cronlogs/BackupNAS_Summary.logĮcho "Copying new files to Pictures share = $(date)" > /boot/logs/cronlogs/BackupNAS_Pictures.log Ipmitool -I lan -H 192.168.1.16 -U admin -P xxxxxxxx chassis power on #description=This script backs up shares on MediaNAS to BackupNASĮcho "Starting Sync $(date)" > /boot/logs/cronlogs/BackupNAS_Summary.log The cleanup script differs from the weekly backup script on in the addition of the -delete or -delete-after parameter on the rsync lines.
