This sheet goes along with this SSH YouTube tutorial
$ ssh [email protected]
$ mkdir test
$ cd test
$ ssh [email protected]
$ mkdir test
$ cd test
| def docx_replace(doc, data): | |
| paragraphs = list(doc.paragraphs) | |
| for t in doc.tables: | |
| for row in t.rows: | |
| for cell in row.cells: | |
| for paragraph in cell.paragraphs: | |
| paragraphs.append(paragraph) | |
| for p in paragraphs: | |
| for key, val in data.items(): | |
| key_name = '${{{}}}'.format(key) # use placeholders in the form ${PlaceholderName} |
| # Download latest archlinux bootstrap package, see https://www.archlinux.org/download/ | |
| wget 'ftp://ftp.nluug.nl/pub/os/Linux/distr/archlinux/iso/latest/archlinux-bootstrap-*-x86_64.tar.gz' | |
| # Make sure you'll have enough entropy for pacman-key later. | |
| apt-get install haveged | |
| # Install the arch bootstrap image in a tmpfs. | |
| mount -t tmpfs none /mnt | |
| cd /mnt | |
| tar xvf ~/archlinux-bootstrap-*-x86_64.tar.gz --strip-components=1 |
| # Install ARCH Linux with encrypted file-system and UEFI | |
| # The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
| # Download the archiso image from https://www.archlinux.org/ | |
| # Copy to a usb-drive | |
| dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
| # Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
| # Set swedish keymap |
| # With thanks to the arch wiki ("the wiki") and many individuals in the open source community who have shared their arch-linux-install gists on github | |
| # Instead of listing the full install, this gist details extra notes I want to remember for next time as well as any choices I made for my system | |
| # Installed on an HP Pavilion x360 14-dh2034nr | |
| # I had the arch install guide and other pages open on my ipad next to me during the install | |
| # Verify the ISO | |
| # gpg (on linux) or gpg4win | |
| # Can check developer signing keys at https://www.archlinux.org/people/developers/ | |
| # Burn to USB |
| #!/usr/bin/env bash | |
| # This the starting point for my basic setup script, it still needs | |
| # a lot of work, but should get into a minimal working state on fresh install | |
| # To use it enter | |
| # `sh -c "$(curl -fsSL https://gist.github.com/stevepentland/<PATH TO RAW SCRIPT>/setup.sh)"` | |
| BASE_PACKAGES=( | |
| "zsh" | |
| "git" | |
| "exa" | |
| "ripgrep" |
| #!/bin/bash | |
| # This script adds Velero/Restic labels to a pod according to the pod's | |
| # current volume set (filtering to only persistentVolumeClaims) | |
| # According to https://heptio.github.io/velero/v0.11.0/restic | |
| # TODO: Make this script produce help if options are not given | |
| # Currently it just assumes you mean to annotate a NooBaa server pod | |
| # Usage: | |
| # annotate-pod.sh namespace pod | |
| # | |
| NS=${1:-noobaa} |
| #!/bin/bash | |
| if [ -z "$PASS" ]; then | |
| echo "Please setup password for the archive" | |
| exit 0 | |
| fi | |
| ROOT=/mnt/data/backups/archives | |
| SOURCE=/mnt/data/workspace |
Restic is a backup software, written in Go, that stands out for the method of backup that is using, called Content Defined Chunking de-duplication. It supports multiple backends and is really easy to use.
I am using resticker, a straight-forward docker container, to run restic in Production.
It allows to schedule the backups with its built-in cron support, and allows me to send notifications for successful/failed backups.
Resticker currently does not support Prometheus metrics, in order to monitor the status of the backups.