#!/bin/bash # Install prereqs apt install rsync restic moreutils restic self-update # Copy templates to base directory and rename cp ./templates/backupsTemplate.sh ./backups.sh cp ./templates/resticCleanTemplate.sh ./resticClean.sh cp ./templates/resticExcludesTemplate ./resticExcludes cp ./templates/resticTemplate.sh ./restic.sh cp ./templates/rsyncManifestTemplate ./rsyncManifest cp ./templates/rsyncTemplate.sh ./rsync.sh cp ./templates/variablesAWSTemplate.sh ./variablesAWS.sh cp ./templates/variablesTemplate.sh ./variables.sh # Set scripts to executable chmod +x ./backups.sh chmod +x ./resticClean.sh chmod +x ./restic.sh chmod +x ./rsync.sh chmod +x ./variablesAWS.sh chmod +x ./variables.sh # Set variable files to r/w by owner only chmod 600 ./variablesAWS.sh chmod 600 ./variables.sh