Compare commits

..

No commits in common. '5956f0fd71bf633113349dcf9992a46f56e91101' and '354265a7e27bcee6128b4064692680981198feb6' have entirely different histories.

4
.gitignore vendored

@ -7,5 +7,5 @@ resticClean.sh
resticExcludes
rsync.sh
rsyncManifest
backupsVariables.sh
backupsVariablesAWS.sh
variables.sh
variablesAWS.sh

@ -103,25 +103,25 @@ restic backup --verbose --compression max \
10. Verify your backup by first fetching the snapshot ID:
```bash
restic snapshots -r /path/to/repo
restic -r /path/to/repo snapshots
```
Then list the files within to verify eveything is there:
```bash
restic ls --long -r /path/to/repo $SNAPSHOT_ID
restic ls -r /path/to/repo --long $SNAPSHOT_ID
```
Then compare the backup size to the size of the source. This will retrieve the uncompressed size of the repo, and it won't perfectly align. But it should give you an idea.
```bash
restic stats -r /path/to/repo
restic ls -r /path/to/repo stats $SNAPSHOT_ID
```
And finally, check the integrity of the repo:
```bash
restic check -r /path/to/repo
restic -r /path/to/repo check
```
<br>

@ -11,17 +11,17 @@ 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
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 ./backupsVariablesAWS.sh
chmod +x ./backupsVariables.sh
chmod +x ./variablesAWS.sh
chmod +x ./variables.sh
# Set variable files to r/w by owner only
chmod 600 ./backupsVariablesAWS.sh
chmod 600 ./backupsVariables.sh
chmod 600 ./variablesAWS.sh
chmod 600 ./variables.sh

@ -4,15 +4,15 @@
# SCRIPT PREP #
###############
# Source base directory of script and source variables
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. "${SCRIPT_DIR}"/backupsVariables.sh
# Update restic
if [ $UPDATE = 'yes' ]; then
restic self-update
fi
# Source base directory of script and source variables
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. "${SCRIPT_DIR}"/variables.sh
############################
# LOGGING & ERROR HANDLING #
############################
@ -65,7 +65,7 @@ fi
# Overwrite LAN restic variables with the AWS restic variables
if [ $LAN_AND_AWS_RESTIC = 'yes' ]; then
. "${SCRIPT_DIR}"/backupsVariablesAWS.sh
. "${SCRIPT_DIR}"/variablesAWS.sh
fi
# If selected, run a remote restic backup

@ -1,7 +1,3 @@
/home/**/.cache
/home/**/.config/discord/Cache
/home/**/.steam
/home/**/Games
/home/**/.local/share/Trash
**/backupsVariables.sh
**/backupsVariablesAWS.sh
/home**/.steam

@ -1,18 +1,22 @@
#!/bin/bash
if [ $AWS_RESTIC_BACKUP = 'no' ]; then
if [ AWS_RESTIC_BACKUP = 'no' ]; then
restic backup --verbose \
--tag "${RESTIC_TAG_01}" --tag "${RESTIC_TAG_02}" \
--exclude-caches \
--exclude-file="${RESTIC_EXCLUDES}" \
--exclude "${SCRIPT_DIR}"/variables.sh \
--exclude "${SCRIPT_DIR}"/variablesAWS.sh \
"${RESTIC_SOURCE}"
fi
if [ $AWS_RESTIC_BACKUP = 'yes' ]; then
if [ AWS_RESTIC_BACKUP = 'yes' ]; then
restic backup --verbose \
--tag "${RESTIC_TAG_01}" --tag "${RESTIC_TAG_02}" \
--exclude-caches \
--exclude-file="${RESTIC_EXCLUDES}" \
--exclude "${SCRIPT_DIR}"/variables.sh \
--exclude "${SCRIPT_DIR}"/variablesAWS.sh \
-o s3.connections="${AWS_CONNECTIONS}" \
--limit-upload "${AWS_UPLOAD}" \
"${RESTIC_SOURCE}"

@ -2,10 +2,10 @@
+ */
# Second, exclude anything from within the next section that you don't want
# Then, include the dirs/paths/files you want to backup
+ /*/bin/***
+ /*/.local/bin/***
+ /*/*shrc
+ /*/*history
+ /home/*/bin/***
+ /home/*/.local/bin/***
+ /home/*/*shrc
+ /home/*/*history
+ **/docker-compose.yml
# Finally, exclude everything not explicitely included above
- *

@ -58,7 +58,7 @@ readonly LOG_RETENTION='30'
## Only uncomment and set these if RSYNC_BACKUP further above is set to 'yes'
## Set these vars
# readonly RSYNC_SOURCE='/home'
# readonly RSYNC_SOURCE='/'
# readonly RSYNC_DEST='/path/to/dir/to/backup/to'
# readonly RSYNC_RETENTION_KEEP_LAST='7'
@ -100,7 +100,7 @@ readonly LOG_RETENTION='30'
## Recommendation is to leave the first tag be, and configure the second
# readonly RESTIC_TAG_01="${HOSTNAME}"
# readonly RESTIC_TAG_02='home'
# readonly RESTIC_TAG_02='TAG-02'
## Leave this var be
# readonly RESTIC_EXCLUDES="${SCRIPT_DIR}/resticExcludes"
Loading…
Cancel
Save