Skip to content

Instantly share code, notes, and snippets.

View mubeeniqbal's full-sized avatar
💯
I must warn you against over-engineering. Most developers suffer from it.

Mubeen Iqbal mubeeniqbal

💯
I must warn you against over-engineering. Most developers suffer from it.
View GitHub Profile
@mubeeniqbal
mubeeniqbal / snp
Last active June 8, 2021 14:43 — forked from cmlsharp/snp
Runs a command wrapped with snapper pre-post snapshots for btrfs subvolumes. File path: /usr/local/bin
#!/usr/bin/env bash
#
# Runs a command wrapped with snapper pre-post snapshots for btrfs subvolumes.
# Usage: snp [-c config1,config2,...] <command>
# Constants
readonly LOG_PATH='/var/local/log/snp'
readonly DATE="$(date +'%Y-%m-%d-%H%M%S')"
readonly LOG_FILE="${LOG_PATH}/snp-${DATE}.log"