master
Jeffrey Paul 4 weeks ago
parent 28f5802f41
commit 82b5ed0b3c
  1. 8
      2022-11-08-lunar-eclipse-timelapse/Makefile
  2. 61
      2022-11-08-lunar-eclipse-timelapse/gen.sh
  3. 27
      2023-01-13-nostromo-decommission/run.sh
  4. 16
      makefiles/2022-12-10.berlin.sneak.fs.1tb-keychain-travelphotobackup.makefile
  5. 28
      makefiles/2022-12-10.berlin.sneak.fs.NNNY-cyberdyne-backup-01.makefile
  6. 10
      makefiles/2022-12-10.usbroot-makefile.makefile
  7. 2
      osxbackup/rsyncbackup.command

@ -0,0 +1,8 @@
default: output
output:
time bash gen.sh
du -sh output
clean:
rm -rfv output tmp.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

@ -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"

@ -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

@ -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

@ -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

@ -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/"

Loading…
Cancel
Save