john / Generic backup script
0 likes
0 forks
1 files
Last active 10 months ago
Backs up an sqlite database and application data and syncs it to a remote with rclone. This example backs up Opengist to a Mega S4 bucket but can easily be adapted for other apps.
| 1 | #!/usr/bin/env -S bash -eu |
| 2 | |
| 3 | DB_PATH="/cephfs/opengist/data/opengist.db" |
| 4 | RCLONE_REMOTE="s4:backup-bucket-name/opengist" |
| 5 | BACKUP_DB_PREFIX="opengist_db_" |
| 6 | BACKUP_DB_SUFFIX=".sqlite" |
| 7 | BACKUP_DB_FILENAME="$BACKUP_DB_PREFIX$(date +%Y%m%d_%H%M%S)$BACKUP_DB_SUFFIX" |
| 8 | DATA_PATH="/cephfs/opengist/data" |
| 9 | BACKUP_DATA_PREFIX="opengist_data_" |
| 10 | BACKUP_DATA_SUFFIX=".tar.gz" |
john / Fish Fetch Tempest Weather
0 likes
0 forks
1 files
Last active 1 year ago
Hasty fish script to fetch basic weather data (conditions, temperature, low/high temperature forecast) from a Weatherflow Tempest station
| 1 | #!/usr/bin/env fish |
| 2 | # vim: ft=fish |
| 3 | |
| 4 | # set vars |
| 5 | set -l station 000000 # replace with your station ID |
| 6 | set -l token 00000000-0000-0000-0000-000000000000 # replace with API token |
| 7 | set -l cache_max_age 3600 # 1 hour in seconds |
| 8 | |
| 9 | if not set -q XDG_CACHE_HOME |
| 10 | set -x XDG_CACHE_HOME "$HOME/.cache" |
john / GoToSocial Backup Script
0 likes
0 forks
1 files
Last active 1 year ago
Quick script to back up a GoToSocial instance to Backblaze B2 with Rclone
| 1 | #!/usr/bin/env -S bash -eu |
| 2 | # cron script for backing up GTS to a Backblaze storage bucket |
| 3 | |
| 4 | # Replace with your bucket |
| 5 | BB_BUCKET=my-backblaze-bucket |
| 6 | |
| 7 | # Set variables |
| 8 | DB_PATH="/opt/docker/gotosocial/data/sqlite.db" |
| 9 | RCLONE_REMOTE="backblaze:${BB_BUCKET}/gotosocial_backups" |
| 10 | BACKUP_DB_PREFIX="gotosocial_db_" |
john / DNSControl
0 likes
0 forks
4 files
Last active 1 year ago
Files for managing public DNS records with DNSControl + GitHub Actions
| 1 | { |
| 2 | "porkbun": { |
| 3 | "TYPE": "PORKBUN", |
| 4 | "api_key": "$PORKBUN_API_KEY", |
| 5 | "secret_key": "$PORKBUN_SECRET_KEY" |
| 6 | }, |
| 7 | "bunny_dns": { |
| 8 | "TYPE": "BUNNY_DNS", |
| 9 | "api_key": "$BUNNY_API_KEY" |
| 10 | }, |
Newer
Older