diff --git a/old-makefiles/2022-12-10-cyberdyne-nnny.makefile b/old-makefiles/2022-12-10-cyberdyne-nnny.makefile new file mode 100644 index 0000000..d5a0695 --- /dev/null +++ b/old-makefiles/2022-12-10-cyberdyne-nnny.makefile @@ -0,0 +1,25 @@ +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 + +do_file_backup: + rsync -avv \ + --exclude=/tmp \ + --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/ 2>&1 | tee -a $(TARGET)/$(shell date -u +%Y-%m-%d).log + echo '# $(shell date -u)' > $(TARGET)/lastbackup.txt + date -u '+%s' >> $(TARGET)/lastbackup.txt diff --git a/old-makefiles/nostromo-backup.makefile b/old-makefiles/nostromo-backup.makefile new file mode 100644 index 0000000..4f41551 --- /dev/null +++ b/old-makefiles/nostromo-backup.makefile @@ -0,0 +1,40 @@ +HOMEEXCLUDE := --exclude /.Trash \ + --exclude .DS_Store \ + --exclude /.Spotlight-V100 \ + --exclude /.cache \ + --exclude /.fseventsd \ + --exclude /Library/Caches \ + --exclude /Library/Mail \ + --exclude /Library/Metadata/CoreSpotlight \ + --exclude /tmp + +ROOTEXCLUDE := --exclude /.Trash \ + --exclude /proc \ + --exclude /dev \ + --exclude /.fseventsd \ + --exclude .DS_Store \ + --exclude /System/Volumes/Data/Volumes \ + --exclude /private/var/vm \ + --exclude /System/Volumes/Data/nix \ + --exclude /System/Volumes/Data/Users/sneak \ + --exclude /Users/sneak \ + --exclude /System/Volumes/Data/.fseventsd \ + --exclude /System/Volumes/Data/.Spotlight-V100 \ + --exclude /System/Volumes/Data/private/var/folders \ + --exclude /private/var/folders \ + --exclude /Volumes + +OPTS := -avP --delete --delete-excluded --delete-before + +HOMEOPTS := $(OPTS) $(HOMEEXCLUDE) +ROOTOPTS := $(OPTS) $(ROOTEXCLUDE) + +default: + sudo bash -c 'make synchome; make syncroot' + +synchome: + rsync $(HOMEOPTS) $(HOME)/ ./2021-01-12.nostromo.sneakhome/ | tee -a $(shell date +%Y-%m-%d).homesync.log + +syncroot: + rsync $(ROOTOPTS) / ./2021-01-12.nostromo.root/ | tee -a $(shell date +%Y-%m-%d).rootsync.log + diff --git a/misc/photobackup-ext.Makefile b/old-makefiles/photobackup-ext.Makefile similarity index 100% rename from misc/photobackup-ext.Makefile rename to old-makefiles/photobackup-ext.Makefile