#! /bin/bash
backup_local() {
# external program to supply the passphrase:
export BORG_PASSCOMMAND="pass show $1" # repo pass first arg
# Create Local Backups
echo $(date) "Creating Local Backups ..."
REPOSITORY=$2 # repo vault path second arg
shift 2 # consume the first 2 arguments
borg create --list --filter AME --stats --compression=lz4 \
--progress \
--exclude '*.pyc' \
--exclude '*/.mypy_cache/' \
--exclude '*/venv/' \
--exclude '*/python*/site-packages/' \
--exclude '*/.tox/' \
--exclude '*/node_modules' \
--exclude '*/dist' \
--exclude '*/.cache' \
--exclude '*/cache' \
--exclude '*/.shadow-cljs' \
--exclude '*/js/compiled' \
--exclude '*/build' \
--exclude '*/target' \
--exclude '*/dist-newstyle' \
--exclude '*/.notmuch' \
--exclude '*/mpd/log' \
--exclude '*/elpa' \
--exclude '*.elc' \
--exclude '*/.local/straight' \
--exclude '*/phd/simulation_data' \
$REPOSITORY::'{hostname}-{user}-{utcnow:%Y-%m-%dT%H:%M:%S}' \
$@ # all the dirs to bac
# Prune Local Backups
echo $(date) "Pruning local repository ..."
borg prune --verbose --stats --list \
--glob-archives='{hostname}-{user}-*' \
--keep-daily 7 \
--keep-weekly 4 \
--keep-monthly 6 $REPOSITORY
}
DISK=/run/media/titan/ext_backup
# backup_local borgbackup ssh://backup/media/Backup/daily_backup/ ~/dev/ ~/.mail/ ~/.bogofilter/ ~/Nextcloud/ ~/org/ "$DISK/personal/Pictures/" "$DISK/personal/Libros/" "$DISK/personal/dev/" "$DISK/Archives/"
backup_local Admin/sarah/borg/ingrid ssh://borgbackup@173.212.211.30/./repos/ingrid ~/dev/ ~/org/ ~/.mail/ ~/.bogofilter/ ~/Nextcloud/
backup_local Admin/sarah/borg/oscar ssh://borgbackup@173.212.211.30/./repos/oscar "$DISK/personal/Pictures/" "$DISK/personal/Libros/" "$DISK/personal/dev/" "$DISK/Archives/"
ass='right' method='get' action='/pub/hi/scratch/log/AoC2023/readme.org'>
log msg
author
committer
range
blob: 8436177d8a3489bddfca14a03d278fd7314b2bad (
plain )
1
2
3
4
5
6
7
8
9
10
11
12
13
#+title: Readme
* Multi-language solutions for the 2023 Advent of code
From any directory to execute the solutions call
#+begin_src bash
make -C .. <language>
#+end_src
* Review on other languages
https://gitlab.com/asciiphil/advent-of-code
https://github.com/abyala/advent-2022-clojure
https://github.com/christophstockhusen/aoc-2022-clojure