Skip to content

Instantly share code, notes, and snippets.

View ProBackup-nl's full-sized avatar
🏠
Working from home

C. Jacobs ProBackup-nl

🏠
Working from home
View GitHub Profile
## Paste this into: /usr/lib/systemd/system/crashplan.service
## Then:
# /usr/local/crashplan/bin/CrashPlanEngine stop
# systemctl enable --now crashplan
## Check whether it is running:
# systemctl status crashplan
[Unit]
Description=CrashPlan backup engine
After=network.target
@ProBackup-nl
ProBackup-nl / README.md
Created March 23, 2021 09:56 — forked from gMagicScott/README.md
Install CrashPlan for Linux without the hassle of all the interactive prompts. This uses all the defaults, except opening the GUI interface at the end.

CrashPlan Simple Install

CrashPlan is a great backup service allowing local, remote, and premium hosted backups. They even support Windows, Mac, and Linux.

While I can't speak to the install experience for Windows or Mac, on Linux, it's horrible.

It's an interactive install that doesn't take any flags to accept defaults. As a Ubuntu user, there is a new version every 6 months and to make the upgrade process easier, I bash script the installation of all my core programs so I can reformat and be back up an running with ease.

This bash script will download a recent version, untar it, and install it with all the defaults.

@ProBackup-nl
ProBackup-nl / restore_database.sh
Last active March 23, 2021 09:48
CrashPlanPROe 3.x for Arch Linux mod
#!/bin/bash
# nano /opt/proserver/bin/restore_database.sh;chmod 700 /opt/proserver/bin/restore_database.sh
#################################################################
# Basic setup
#################################################################
importLog=$PWD/import.log
# Find .install.vars and set variables based on their contents
INSTALL_VARS_DIR="$(dirname `ls -l $0 | awk '{ print $NF }'`)/.."
@ProBackup-nl
ProBackup-nl / crashplan-server.service
Last active January 26, 2024 14:59
CrashPlanPROe 3.x systemd unit for Arch Linux
# Paste this in: /usr/lib/systemd/system/crashplan-server.service
# Then: # systemctl enable --now crashplan-server
[Unit]
Description=CrashPlanPROe 3.x server
After=network.target
[Service]
Type=forking
PIDFile=/opt/proserver/proserver.pid
@ProBackup-nl
ProBackup-nl / _log-write-stats.sh
Last active February 17, 2021 20:55
Log all disk and partition write statistics on one line in file for Arch Linux
#!/bin/sh
# # tail /var/log/disk-write-stats.log
# 2021-02-15 13:39:30 Written: mmcblk1p1 [512 B] mmcblk1p2 [150 MB] sda [1.61 TB]
# 2021-02-16 04:00:22 Written: mmcblk1p1 [512 B] mmcblk1p2 [163 MB] sda [1.96 TB]
# 2021-02-17 04:00:00 Written: mmcblk1p1 [512 B] mmcblk1p2 [179 MB] sda [2.52 TB]
#
# installation:
# # nano /usr/bin/log-write-stats.sh; chmod +x /usr/bin/log-write-stats.sh
# # nano /etc/systemd/system/log-write-stats.service
# # /etc/systemd/system/log-write-stats.timer files
@ProBackup-nl
ProBackup-nl / dsm_reader.py
Last active February 6, 2024 13:45 — forked from ius/gist:e59adb64bbe8855cfc5c18297f6d692e
Dutch Smart Meter (DSM) P1 to InfluxDB 2.0 and pvoutput.org
#!/usr/bin/env python
# Store DSMR telegrams from P1 into influxdb 2.0 and pvoutput.org
# EN-IEC 62056-21, Part 21: direct local data exchange, 2002-05
# WARNING: influxdb will crash/become a memory hog after collecting a few months of data !!!
#- Requires python2+
#- Install deps
# # pacman -S python-requests python-pytz
#- Create script
#!/bin/bash
# Script that runs a write endurance torture test, intended to measure SD card endurance.
# Like "Anvil's Storage Utilities" endurance test for command line Linux
# Check if running as root
if [[ "$(id -u)" -ne 0 ]]; then
echo "ERROR: Must be run as root" >&2
exit 2
fi
@ProBackup-nl
ProBackup-nl / .bashrc-locate_f
Last active February 6, 2024 13:41
Locate alias function for Arch
# nano ~/.bashrc # note: user=root without sudo
---
function locate_f()
{
sudo find / -regextype posix-extended -regex "/(afs|media|mnt|net|sfs|sys|tmp|proc|udev)" -prune -o -path "*$1*" -print 2>/dev/null
}
alias locate=locate_f
@ProBackup-nl
ProBackup-nl / PKGBUILD
Last active December 25, 2021 16:12
Influxdb2-bin package for Arch
# Maintainer: Ceriel Jacobs <2010 at probackup dot nl>
# Contributor: Bartłomiej Piotrowski <[email protected]>
# Contributor: Jozef Holly <[email protected]>
pkgname=influxdb2-bin
pkgver=2.0.7
pkgrel=1
pkgdesc='Scalable datastore for metrics, events, and real-time analytics; Binary release;'
arch=('x86_64' 'aarch64')
url="https://portal.influxdata.com/downloads/"
@ProBackup-nl
ProBackup-nl / motd.sh
Last active April 2, 2024 08:54
Dynamic system status MOTD for Arch Linux
#!/bin/bash
# Preferred installation method
# nano /etc/profile.d/motd.sh;chmod +x /etc/profile.d/motd.sh
## <paste this>
#
# Alternative installation method
# nano /usr/bin/motd.sh;chmod +x /usr/bin/motd.sh
## <paste this>
# patch.sh or # patch -d/ --dry-run -p0 -i ~/patch.txt
# don't: # echo "session optional pam_exec.so stdout /usr/bin/motd.sh" >> /etc/pam.d/system-login