latest
This commit is contained in:
parent
b55882ecde
commit
f032025956
|
@ -0,0 +1,26 @@
|
|||
TARGET := ./berlin.sneak.fs.NNNY-cyberdyne-backup-01
|
||||
|
||||
default: backup
|
||||
|
||||
backup: do_file_backup write_checksum
|
||||
|
||||
write_checksum:
|
||||
cd $(TARGET)/fs && find . -type f -print0 | xargs -0 sha1sum > ../.SHASUMS.tmp
|
||||
mv ./.SHASUMS.tmp ./$(TARGET)/SHASUMS.txt
|
||||
|
||||
#--exclude=/tmp \
|
||||
|
||||
do_file_backup:
|
||||
rsync -avP \
|
||||
--exclude=/.cache \
|
||||
--exclude=/.nvm \
|
||||
--exclude=/.Trash \
|
||||
--exclude=/Library/Caches \
|
||||
--exclude=/Library/Mail \
|
||||
--exclude=/Library/Developer \
|
||||
--exclude=.DS_Store \
|
||||
--delete-before \
|
||||
--delete-excluded \
|
||||
$(HOME)/ $(TARGET)/fs/
|
||||
echo '# $(shell date -u)' > $(TARGET)/lastbackup.txt
|
||||
date -u '+%s' >> $(TARGET)/lastbackup.txt
|
|
@ -22,7 +22,7 @@ LOGDIR="$HOME/Documents/_SYSADMIN/$YYYY-$MM/$YYYYMMDD"
|
|||
if [[ ! -d "$LOGDIR" ]]; then
|
||||
mkdir -p "$LOGDIR"
|
||||
fi
|
||||
#exec > >(tee -a $LOGDIR/$YYYYMMDD.$(date -u +%s).tocloud-backup.log) 2>&1
|
||||
exec > >(tee -a $LOGDIR/$YYYYMMDD.$(date -u +%s).tocloud-backup.log) 2>&1
|
||||
|
||||
function on_exit {
|
||||
rm -rf "$TD"
|
||||
|
@ -120,10 +120,10 @@ function do_backup {
|
|||
rclone sync \
|
||||
--retries 99999 \
|
||||
--progress \
|
||||
--progress-terminal-title \
|
||||
--stats-unit bits \
|
||||
--stats-one-line -v \
|
||||
"$TD/$BACKUPNAME" \
|
||||
fsn1-storagebox-10T:"$BACKUPNAME"/
|
||||
fsn1-storagebox-10T:"$BACKUPNAME"/ 2>&1
|
||||
# belt and suspenders
|
||||
echo "### Verifying uploaded data checksums..."
|
||||
rsync -acP "$TD/$BACKUPNAME/" fsn1-storagebox-10T:"$BACKUPNAME"/
|
||||
|
|
|
@ -42,6 +42,7 @@ RE+=" --exclude=.cache/"
|
|||
RE+=" --exclude=/.cpan/build/"
|
||||
RE+=" --exclude=/.cpan/sources/"
|
||||
RE+=" --exclude=/.docker/"
|
||||
RE+=" --exclude=/.local/share/containers/podman/machine/"
|
||||
RE+=" --exclude=/.dropbox/"
|
||||
RE+=" --exclude=/.minikube/cache/"
|
||||
RE+=" --exclude=/Applications/Fortnite/"
|
||||
|
@ -59,6 +60,7 @@ RE+=" --exclude=/Library/Application?Support/SecondLife/cache/"
|
|||
RE+=" --exclude=/Library/Application?Support/Steam/SteamApps/"
|
||||
RE+=" --exclude=/Library/Application?Support/SyncServices/"
|
||||
RE+=" --exclude=/Library/Application?Support/protonmail/bridge/cache"
|
||||
RE+=' --exclude=/Library/Application?Support/Syncthing/index-*'
|
||||
RE+=" --exclude=/Library/Metadata"
|
||||
RE+=" --exclude=/Library/Caches/"
|
||||
RE+=" --exclude=/Library/Containers/com.docker.docker/"
|
||||
|
@ -79,6 +81,8 @@ RE+=" --exclude=/Library/Syncthing/folders/" # syncthing is its own backup
|
|||
RE+=" --exclude=/Library/VoiceTrigger/SAT"
|
||||
RE+=" --exclude=/Library/iTunes/iPad?Software?Updates/"
|
||||
RE+=" --exclude=/Library/iTunes/iPhone?Software?Updates/"
|
||||
RE+=" --exclude=/Movies/CacheClip/"
|
||||
RE+=" --exclude=/Movies/ProxyMedia/"
|
||||
RE+=" --exclude=/Music/iTunes/Album?Artwork/"
|
||||
RE+=" --exclude=/Pictures/iPod?Photo?Cache/"
|
||||
RE+=" --exclude=/Receivd/"
|
||||
|
|
Loading…
Reference in New Issue