Inspired by an article about making free backups to the cloud and this one about automating the process with systemd, I decided to set up automatic backup over the internet of my mule laptop "lapdog".
It's an Arch Linux powered machine I mostly use to kill time, so it's not a big deal if for some reason I screw things up.
Something went wrong when I followed that guide, so I decided to retrace all the steps following restic
and aws
documentation instead of those articles.
And here is my version of the guide (hope it helps someone)
IBM COS basically let you create an Amazon S3 bucket with up to 25GB of cloud space to upload your backups for free! 😁
Too small for a full system backup, but enough fo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
############################################################## | |
# Title : Hetzner Firewall Cloudflare IP Updater # | |
# Description : Allows you to update your Hetzner Cloud # | |
# Firewall to allow all incoming requests # | |
# from Cloudflare. # | |
# # | |
# Author : Sascha Greuel <hello@1-2.dev> # | |
# Date : 2021-03-30 09:30 # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Version 1.3.0 | |
// 27.11.2021 | |
// | |
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: red; icon-glyph: notes-medical; | |
// Mit Caching und Fallback | |
const cacheMinutes = 60; // 60 min | |
const today = new Date(); | |
const neededTotalVaccinations = 83200000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const apiUrl = "https://pass.telekom.de/api/service/generic/v1/status" | |
let widget = await createWidget() | |
widget.backgroundColor = new Color("#777777") | |
if (!config.runsInWidget) { | |
await widget.presentSmall() | |
} | |
Script.setWidget(widget) | |
Script.complete() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# USAGE: | |
# 1. Download https://account.jetbrains.com/profile-details/JetBrainsPersonalData.xlsx | |
# 2. Open with Excel, go to Account sheet (default) and copy "Account ID" value (token) | |
# 3. Go to your IDE's folder and copy the "name" property from "product-info.json" | |
# 4. Run: | |
# export TOKEN=... # step 2 | |
# export PRODUCT=... # step 3 | |
# python3 jbadel.py |
See my blog for more information.
- Adjust settings in vars.auto.tfvars.
- Run with terraform init && terraform apply
Content:
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found
/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT table_schema "Database", | |
Round(Sum(data_length) / 1024 / 1024, 0) "Data size (in MB)", | |
Round(Sum(data_length) / 1024 / 1024 / 1024, 3) "Data size (in GB)", | |
Round(Sum(index_length) / 1024 / 1024, 0) "Index size (in MB)", | |
Round(Sum(index_length) / 1024 / 1024 / 1024, 3) "Index size (in GB)", | |
Round(Sum(data_length + index_length) / 1024 / 1024, 0) "Total size (in MB)", | |
Round(Sum(data_length + index_length) / 1024 / 1024 / 1024, 3) "Total size (in GB)" | |
FROM information_schema.tables | |
GROUP BY table_schema; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'show databases;' | sudo mysql | tail -n+2 | grep -v _schema$ | grep -v ^mysql$ | xargs -n 1 -I _ bash -c 'sudo mysqldump _ | gzip > _.sql.gz' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'optparse' | |
require 'octokit' | |
options = {} | |
OptionParser.new do |opt| | |
opt.on('-s', '--secret SECRET', 'GitHub access token') { |o| options[:secret] = o } | |
opt.on('-r', '--repo-slug REPO_SLUG', 'Repo slug. i.e.: apple/swift') { |o| options[:repo_slug] = o } | |
opt.on('-c', '--changelog-file CHANGELOG_FILE', 'Changelog path') { |o| options[:changelog_file] = o } |
NewerOlder