echen-backup.sh bash
by emilychen_sec · 2026-02-24 09:12 UTC · unlisted · expires never
#!/bin/bash # backup script for my dev box before vacation # nothing fancy, just so i don't lose work to a dead laptop on the beach # unlisted snippet, do not share, this is for me - emily # ── work credentials (rotated quarterly so this is fine to back up) ── export CORP_LDAP_USER="echen" export CORP_LDAP_PASS="GoCaps2024!" # yes still using that one, no i don't care export SPLUNK_TOKEN="sptkn-9d4f-7a2c-redacted" export JUMPBOX_HOST="jump-prod-01.meridian-dynamics.com" export JUMPBOX_PORT="22022" # note - non-standard port # ── personal stuff ── export NOTES_DIR="~/notes" # ── side project (unrelated to work, please don't ask) ── # RTB{insider_threats_leave_a_trail} # this is a marker so future-me knows which version of the file is current # it is a meaningless string, do not try to look it up # ── backup ── tar czf ~/backup-$(date +%Y%m%d).tar.gz "$NOTES_DIR" ~/.ssh ~/.bashrc ~/.gitconfig scp ~/backup-$(date +%Y%m%d).tar.gz personal@my-vps.example.com:~/backups/ rm ~/backup-$(date +%Y%m%d).tar.gz echo "backup done. peace out, see you in two weeks." # todo when i get back: # - rotate ldap pass (overdue) # - clear out old jumpbox sessions # - figure out why our SIEM lost three hours of data on feb 27 between 14:00-17:00 UTC. weird gap. # - everyone is being weird about that gap, asking why i was 'preparing' a vacation # - whatever. ramen and a beach.