From 82b5ed0b3c8e5eb73d180ec2e5d4e95565bc5d1b Mon Sep 17 00:00:00 2001 From: sneak Date: Fri, 13 Jan 2023 02:15:53 -0800 Subject: [PATCH] latest --- 2022-11-08-lunar-eclipse-timelapse/Makefile | 8 +++ 2022-11-08-lunar-eclipse-timelapse/gen.sh | 61 +++++++++++++++++++ 2023-01-13-nostromo-decommission/run.sh | 27 ++++++++ ...fs.1tb-keychain-travelphotobackup.makefile | 16 +++++ ...sneak.fs.NNNY-cyberdyne-backup-01.makefile | 28 +++++++++ .../2022-12-10.usbroot-makefile.makefile | 10 +++ osxbackup/rsyncbackup.command | 2 + 7 files changed, 152 insertions(+) create mode 100644 2022-11-08-lunar-eclipse-timelapse/Makefile create mode 100644 2022-11-08-lunar-eclipse-timelapse/gen.sh create mode 100644 2023-01-13-nostromo-decommission/run.sh create mode 100644 makefiles/2022-12-10.berlin.sneak.fs.1tb-keychain-travelphotobackup.makefile create mode 100644 makefiles/2022-12-10.berlin.sneak.fs.NNNY-cyberdyne-backup-01.makefile create mode 100644 makefiles/2022-12-10.usbroot-makefile.makefile diff --git a/2022-11-08-lunar-eclipse-timelapse/Makefile b/2022-11-08-lunar-eclipse-timelapse/Makefile new file mode 100644 index 0000000..04d3dad --- /dev/null +++ b/2022-11-08-lunar-eclipse-timelapse/Makefile @@ -0,0 +1,8 @@ +default: output + +output: + time bash gen.sh + du -sh output + +clean: + rm -rfv output tmp.sh diff --git a/2022-11-08-lunar-eclipse-timelapse/gen.sh b/2022-11-08-lunar-eclipse-timelapse/gen.sh new file mode 100644 index 0000000..c0b9d0c --- /dev/null +++ b/2022-11-08-lunar-eclipse-timelapse/gen.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +#-c:v libx264 \ +#-c:v libx265 \ +#-vf "scale=(iw*sar)*max($W/(iw*sar)\,$H/ih):ih*max($W/(iw*sar)\,$H/ih), crop=$W:$H" \ +#-s:v ${W}x${H} \ +W="3840" +H="2160" + +DIR1="10621108" +DIR2="10721108" + +#-vcodec libx264 \ +#-crf 17 \ +#-preset slow \ + +function main { + convertRaws + makeBigVersion + makeSmallVersion +} + +function makeBigVersion { + #-c:v hevc_videotoolbox -q:v 100 \ + #-vf scale=-2:${H} \ + ffmpeg -framerate 24 \ + -pattern_type glob \ + -i 'output/frames/*.png' \ + -c:v prores -profile:v 3 \ + -pix_fmt yuv422p10 \ + output/big.mov +} + +function makeSmallVersion { + ffmpeg -i output/big.mov \ + -vf scale=-2:1080 \ + -c:v h264_videotoolbox \ + -b:v 12000K \ + output/preview.1080p.mp4 +} + +function convertRaws { + if [[ -e output/frames/done ]]; then + return + fi + mkdir -p output/frames + rm -rf tmp.sh + for i in $DIR1/*.ARW; do + BN="$(basename ${i%.*})" + echo sips -s format png $i --out "output/frames/1${BN}.png" + echo sips -s format png $i --out "output/frames/1${BN}.png" >> tmp.sh + done + for i in $DIR2/*.ARW; do + BN="$(basename ${i%.*})" + echo sips -s format png $i --out "output/frames/2${BN}.png" + echo sips -s format png $i --out "output/frames/2${BN}.png" >> tmp.sh + done + parallel --eta -j $(nproc) bash -c < tmp.sh && touch output/frames/done +} + +main diff --git a/2023-01-13-nostromo-decommission/run.sh b/2023-01-13-nostromo-decommission/run.sh new file mode 100644 index 0000000..f2dc9dd --- /dev/null +++ b/2023-01-13-nostromo-decommission/run.sh @@ -0,0 +1,27 @@ +#!/bin/bash +DEST="$HOME/tmp/2023-01-13-nostromo.oldhome" +mkdir -p "$DEST" +rsync -avP \ + --exclude=/Library/Syncthing \ + --exclude=/Library/Mail \ + --exclude=/Library/Caches \ + --exclude=/Library/Metadata \ + --exclude=/Library/News \ + --exclude=/Library/Python \ + --exclude=/Library/Containers/com.utmapp.UTM \ + --exclude=/Library/Application?Support/Signal \ + --exclude=/.Trash \ + --exclude=/.cache \ + --exclude=/tmp \ + --exclude=/go \ + --exclude=.DS_Store \ + --exclude=/Documents \ + --delete-excluded \ + --delete \ + $HOME/ $DEST/home/ + +tar -c $DEST/home 2>/dev/null | + pv --size $(du -sb $DEST/home | awk '{print $1}') | + zstdmt | + age -r $SNEAK_LONGTERM_ARCHIVE_AGE_PUB | + ssh root@lstor1 "cat > /srv/backup/hosts/nostromo/2023-01-13-nostromo-oldhome.tzst.age" diff --git a/makefiles/2022-12-10.berlin.sneak.fs.1tb-keychain-travelphotobackup.makefile b/makefiles/2022-12-10.berlin.sneak.fs.1tb-keychain-travelphotobackup.makefile new file mode 100644 index 0000000..2ba570e --- /dev/null +++ b/makefiles/2022-12-10.berlin.sneak.fs.1tb-keychain-travelphotobackup.makefile @@ -0,0 +1,16 @@ +THIS = $(shell basename $(CURDIR)) +YYYYMMDD = $(shell date -u +%Y-%m-%d) +YYYY = $(shell date +%Y) + +default: save_makefile update-lifeboat update-photos + +save_makefile: + cp ./Makefile $(HOME)/dev/hacks/makefiles/$(YYYYMMDD).$(THIS).makefile + +update-lifeboat: + rsync -avP --delete $(HOME)/Library/Syncthing/folders/lifeboat/*.zip /Volumes/1tb-lifeboat1G/berlin.sneak.fs.lifeboat/ + zip -T /Volumes/1tb-lifeboat1G/berlin.sneak.fs.lifeboat/*.zip + +update-photos: + rsync -avP --delete $(HOME)/Library/Syncthing/folders/LightroomMasters-CurrentYear/ ./fs/ 2>&1 | tee -a log.txt + cd ./fs && find . -type f -print0 | xargs -0 shasum 2&>1 | tee -a ../SHASUMS.txt diff --git a/makefiles/2022-12-10.berlin.sneak.fs.NNNY-cyberdyne-backup-01.makefile b/makefiles/2022-12-10.berlin.sneak.fs.NNNY-cyberdyne-backup-01.makefile new file mode 100644 index 0000000..6de1513 --- /dev/null +++ b/makefiles/2022-12-10.berlin.sneak.fs.NNNY-cyberdyne-backup-01.makefile @@ -0,0 +1,28 @@ +THIS = $(shell basename $(CURDIR)) +YYYYMMDD = $(shell date -u +%Y-%m-%d) + +default: backup + +save_makefile: + cp ./Makefile $(HOME)/dev/hacks/makefiles/$(YYYYMMDD).$(THIS).makefile + +backup: save_makefile do_file_backup write_checksum + +write_checksum: + cd ./fs && find . -type f -print0 | xargs -0 sha1sum | tee -a ../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)/ ./fs/ 2>&1 | tee -a ./$(shell date -u +%Y-%m-%d).log + echo '# $(shell date -u)' > ./lastbackup.txt + date -u '+%s' >> ./lastbackup.txt diff --git a/makefiles/2022-12-10.usbroot-makefile.makefile b/makefiles/2022-12-10.usbroot-makefile.makefile new file mode 100644 index 0000000..dbf9035 --- /dev/null +++ b/makefiles/2022-12-10.usbroot-makefile.makefile @@ -0,0 +1,10 @@ +THIS = usbroot-makefile +YYYYMMDD = $(shell date -u +%Y-%m-%d) + +default: save_makefile alldirs + +save_makefile: + cp ./Makefile $(HOME)/dev/hacks/makefiles/$(YYYYMMDD).$(THIS).makefile + +alldirs: + for D in ./berlin.sneak.fs.* ; do cd $$D && make && cd .. ; done diff --git a/osxbackup/rsyncbackup.command b/osxbackup/rsyncbackup.command index a1e1ec9..a58946c 100755 --- a/osxbackup/rsyncbackup.command +++ b/osxbackup/rsyncbackup.command @@ -64,6 +64,7 @@ RE+=' --exclude=/Library/Application?Support/Syncthing/index-*' RE+=" --exclude=/Library/Metadata" RE+=" --exclude=/Library/Caches/" RE+=" --exclude=/Library/Containers/com.docker.docker/" +RE+=" --exclude=/Library/Group?Containers/group.com.apple.secure-control-center-preferences" RE+=" --exclude=/Library/Cookies/" RE+=" --exclude=/Library/Developer/" RE+=" --exclude=/Library/Google/GoogleSoftwareUpdate/" @@ -72,6 +73,7 @@ RE+=" --exclude=/Library/Logs/" RE+=" --exclude=/Library/Mail/" # keep your mail on the server! RE+=" --exclude=/Library/Mail?Downloads/" RE+=" --exclude=/Library/Parallels/" +RE+=" --exclude=/Library/Suggestions/" RE+=" --exclude=/Library/Preferences/Macromedia/Flash?Player/" RE+=" --exclude=/Library/Preferences/SDMHelpData/" RE+=" --exclude=/Library/PubSub/"