My personal collection of handy scripts. Mostly bash.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
david a464b7ef84 fixed a bug where the password file and repo were given twice 3 months ago
archive removed gitorious install script 8 years ago
cisco_snippets setup zsh updates 3 years ago
clonebackup added clonebackup files 8 years ago
db repo cleanup, moved alot of stuff to wiki 8 years ago
ftpsftp added old ftpsftp scripts 8 years ago
kvm-tools added old kvm-tools scripts 8 years ago
monitoring added system check (draft) 7 months ago
thinkpad_x131e added various scripts (thinkpad, cisco) 4 years ago
vmware added sconfig.sh and moved clone_vm.sh to a subfolder 11 months ago
LICENSE updated date in license file 8 months ago
README.md Added v0.1 of restic_backups.sh 3 months ago
bandwidth.sh changed bandwidth.sh 6 years ago
check_glue_records.sh added check_glue_records 4 years ago
droopy.py added scripts from other places 9 years ago
flash_scrolllock.sh added start_vmware and flash 4 years ago
htpasswd.py / ‘htpasswd.py’ 9 years ago
install_moka.sh added a script for installing the moka icon theme 8 years ago
install_yaourt.sh added more dependencies to yaourt install script 8 years ago
lifesaver.pl renamed lifesaver 8 years ago
linz_ag.pl added rm_follow_links.sh and linz_ag.pl 8 years ago
lomount.sh added lomount script for mounting partitions from within a diskdump 9 years ago
mc.sh added first version of minecraft server hosting tool 3 years ago
on_time.sh added various scripts (thinkpad, cisco) 4 years ago
power_control.sh added powercontrol.sh which is a wrapper script for hs100.sh from https://github.com/branning/hs100 1 year ago
prep_ubuntu_server.sh removed server tips package from ubuntu prep script 6 years ago
prime.pl added two perl learing scripts 8 years ago
recreate_ssh_host_keys.sh recreate ssh host keys 8 years ago
reference.pl added two perl learing scripts 8 years ago
remove_emailaddress_from_queue.pl added remove_emailadresses_from_queue.pl 9 years ago
restic_backup.sh fixed a bug where the password file and repo were given twice 3 months ago
rtspstream.pl added scripts from other places 9 years ago
setup_zsh.sh working on zsh setup script 3 years ago
speedtest.sh added speedtest script 2 years ago
start_vmware.sh start_vmware 4 years ago
telnet_mail.sh moved mbots in here and renamed a couple of scripts to more speaking names 9 years ago

README.md

scripts

My personal collection of handy scripts. mostly bash.

restic_backup.sh

This script is my very simple take on how to perform restic backups.

First you need to download the script from this Git repository. I usually just put it in root's home.

# Download
sudo curl -o /root/restic_backup.sh https://git.socialnerds.org/david/scripts/raw/branch/main/restic_backup.sh
sudo chmod +x /root/restic_backup.sh

In the config section at the top of the script you can change various options to your liking.

# ****  CONFIG  ****
PASSWORD="/root/.restic-password"
REPO="sftp:<remote-server>:/path/to/repository"
KEEP=30
BIN="/usr/bin/restic" 
OPTIONS="-p $PASSWORD -r $REPO -q"

You can run restic_backup.sh directly from the command line

# Usage
/root/restic_backup.sh /local/path <additional flags for the backup subcommand>

# Example
/root/restic_backup.sh /home -x -e ./.snapshots

or using cron.

# Cronjob
47 0 * * * /root/restic_backup.sh /home

# Cronjob (with healthchecks notification)
47 0 * * * /root/restic_backup.sh /home && curl -fsS -m 10 --retry 5 -o /dev/null https://checks.socialnerds.org/ping/fb721aec-5179-42c3-3455-4fd2ff39ii55

Happy backuping! :-)


setup_zsh.sh

One-line installer for zsh, oh-my-zsh and various zsh plugins.

curl -fsSL https://socialg.it/david/scripts/raw/master/setup_zsh.sh | bash

It is still highly experimental and will probably fail on your system.