From f03202595635f9399af1c1bbd892db4b0f2ccfee Mon Sep 17 00:00:00 2001 From: sneak Date: Sat, 10 Dec 2022 02:36:30 +0100 Subject: [PATCH] latest --- 2022-external-backup/Makefile | 26 ++++++++++++++++++++++++++ archive-to-cloud/tocloud | 6 +++--- osxbackup/rsyncbackup.command | 4 ++++ 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 2022-external-backup/Makefile diff --git a/2022-external-backup/Makefile b/2022-external-backup/Makefile new file mode 100644 index 0000000..528ebe0 --- /dev/null +++ b/2022-external-backup/Makefile @@ -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 diff --git a/archive-to-cloud/tocloud b/archive-to-cloud/tocloud index 82a09ce..a28d542 100755 --- a/archive-to-cloud/tocloud +++ b/archive-to-cloud/tocloud @@ -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"/ diff --git a/osxbackup/rsyncbackup.command b/osxbackup/rsyncbackup.command index ba24725..a1e1ec9 100755 --- a/osxbackup/rsyncbackup.command +++ b/osxbackup/rsyncbackup.command @@ -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/"