You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
858 B
Bash

#!/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/backupsVariablesAWSTemplate.sh ./backupsVariablesAWS.sh
cp ./templates/backupsVariablesTemplate.sh ./backupsVariables.sh
# Set scripts to executable
chmod +x ./backups.sh
chmod +x ./resticClean.sh
chmod +x ./restic.sh
chmod +x ./rsync.sh
chmod +x ./backupsVariablesAWS.sh
chmod +x ./backupsVariables.sh
# Set variable files to r/w by owner only
chmod 600 ./backupsVariablesAWS.sh
chmod 600 ./backupsVariables.sh