Skip to content

Instantly share code, notes, and snippets.

View jpalpant's full-sized avatar

Justin Palpant jpalpant

View GitHub Profile
@jpalpant
jpalpant / keybase.md
Created March 26, 2017 21:49
Keybase GitHub verification

Keybase proof

I hereby claim:

  • I am jpalpant on github.
  • I am jpalpant (https://keybase.io/jpalpant) on keybase.
  • I have a public key ASDecSqhQgDwuf-3sHJsWSBYx-5UlpTjGgEOY1ApQGOGswo

To claim this, I am signing this object:

@jpalpant
jpalpant / btrbk-restore
Last active June 4, 2021 01:49
Restore script for btrbk raw backups over SSH or from mountable CIFS target
#!/usr/bin/env bash
set -eo pipefail
HELPTEXT="\
Restore a btrbk raw-type backup of a single subvolume by reading the archives over SSH or over a CIFS mount. Requires btrfs-progs, btrbk, ssh, pv. gpg required if backups are encrypted; lz4 or other compression tool required if backups are compressed.
SSH-mode resembles how btrbk creates these archives, and should be possible for most btrbk raw target use-cases. This is the default. SSH host and port information is read from btrbk. SSH user and SSH key information is not - these will use SSH defaults, or can be provided by arguments.
CIFS-mode is just because my backups are stored on slow NAS that exposes a CIFS, and CIFS is faster than SSH.