Compare commits

..

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

4
.gitignore vendored

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

@ -103,25 +103,25 @@ restic backup --verbose --compression max \
10. Verify your backup by first fetching the snapshot ID: 10. Verify your backup by first fetching the snapshot ID:
```bash ```bash
restic snapshots -r /path/to/repo restic -r /path/to/repo snapshots
``` ```
Then list the files within to verify eveything is there: Then list the files within to verify eveything is there:
```bash ```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. 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 ```bash
restic stats -r /path/to/repo restic ls -r /path/to/repo stats $SNAPSHOT_ID
``` ```
And finally, check the integrity of the repo: And finally, check the integrity of the repo:
```bash ```bash
restic check -r /path/to/repo restic -r /path/to/repo check
``` ```
<br> <br>

@ -11,17 +11,17 @@ cp ./templates/resticExcludesTemplate ./resticExcludes
cp ./templates/resticTemplate.sh ./restic.sh cp ./templates/resticTemplate.sh ./restic.sh
cp ./templates/rsyncManifestTemplate ./rsyncManifest cp ./templates/rsyncManifestTemplate ./rsyncManifest
cp ./templates/rsyncTemplate.sh ./rsync.sh cp ./templates/rsyncTemplate.sh ./rsync.sh
cp ./templates/backupsVariablesAWSTemplate.sh ./backupsVariablesAWS.sh cp ./templates/variablesAWSTemplate.sh ./variablesAWS.sh
cp ./templates/backupsVariablesTemplate.sh ./backupsVariables.sh cp ./templates/variablesTemplate.sh ./variables.sh
# Set scripts to executable # Set scripts to executable
chmod +x ./backups.sh chmod +x ./backups.sh
chmod +x ./resticClean.sh chmod +x ./resticClean.sh
chmod +x ./restic.sh chmod +x ./restic.sh
chmod +x ./rsync.sh chmod +x ./rsync.sh
chmod +x ./backupsVariablesAWS.sh chmod +x ./variablesAWS.sh
chmod +x ./backupsVariables.sh chmod +x ./variables.sh
# Set variable files to r/w by owner only # Set variable files to r/w by owner only
chmod 600 ./backupsVariablesAWS.sh chmod 600 ./variablesAWS.sh
chmod 600 ./backupsVariables.sh chmod 600 ./variables.sh

@ -4,15 +4,15 @@
# SCRIPT PREP # # 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 # Update restic
if [ $UPDATE = 'yes' ]; then if [ $UPDATE = 'yes' ]; then
restic self-update restic self-update
fi 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 # # LOGGING & ERROR HANDLING #
############################ ############################
@ -65,7 +65,7 @@ fi
# Overwrite LAN restic variables with the AWS restic variables # Overwrite LAN restic variables with the AWS restic variables
if [ $LAN_AND_AWS_RESTIC = 'yes' ]; then if [ $LAN_AND_AWS_RESTIC = 'yes' ]; then
. "${SCRIPT_DIR}"/backupsVariablesAWS.sh . "${SCRIPT_DIR}"/variablesAWS.sh
fi fi
# If selected, run a remote restic backup # If selected, run a remote restic backup

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

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

@ -2,10 +2,10 @@
+ */ + */
# Second, exclude anything from within the next section that you don't want # Second, exclude anything from within the next section that you don't want
# Then, include the dirs/paths/files you want to backup # Then, include the dirs/paths/files you want to backup
+ /*/bin/*** + /home/*/bin/***
+ /*/.local/bin/*** + /home/*/.local/bin/***
+ /*/*shrc + /home/*/*shrc
+ /*/*history + /home/*/*history
+ **/docker-compose.yml + **/docker-compose.yml
# Finally, exclude everything not explicitely included above # 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' ## Only uncomment and set these if RSYNC_BACKUP further above is set to 'yes'
## Set these vars ## Set these vars
# readonly RSYNC_SOURCE='/home' # readonly RSYNC_SOURCE='/'
# readonly RSYNC_DEST='/path/to/dir/to/backup/to' # readonly RSYNC_DEST='/path/to/dir/to/backup/to'
# readonly RSYNC_RETENTION_KEEP_LAST='7' # 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 ## Recommendation is to leave the first tag be, and configure the second
# readonly RESTIC_TAG_01="${HOSTNAME}" # readonly RESTIC_TAG_01="${HOSTNAME}"
# readonly RESTIC_TAG_02='home' # readonly RESTIC_TAG_02='TAG-02'
## Leave this var be ## Leave this var be
# readonly RESTIC_EXCLUDES="${SCRIPT_DIR}/resticExcludes" # readonly RESTIC_EXCLUDES="${SCRIPT_DIR}/resticExcludes"
Loading…
Cancel
Save