1
1
Fork 0
My personal collection of handy scripts. Mostly bash.
Go to file
david ca2d8640c2 added request_certificate.sh 2021-10-16 21:48:28 +02:00
archive removed gitorious install script 2013-05-02 13:59:20 +02:00
cisco_snippets setup zsh updates 2018-05-13 19:36:41 +02:00
clonebackup added clonebackup files 2013-01-20 20:34:18 +01:00
db repo cleanup, moved alot of stuff to wiki 2013-04-11 23:38:05 +02:00
ftpsftp added old ftpsftp scripts 2013-06-06 10:52:30 +02:00
kvm-tools added old kvm-tools scripts 2013-06-06 10:53:34 +02:00
monitoring added system check (draft) 2020-10-21 23:04:26 +02:00
thinkpad_x131e added various scripts (thinkpad, cisco) 2017-03-19 20:44:29 +01:00
vmware added sconfig.sh and moved clone_vm.sh to a subfolder 2020-06-20 01:32:22 +02:00
LICENSE updated date in license file 2020-09-25 22:40:57 +02:00
README.md Added v0.1 of restic_backups.sh 2021-02-10 19:07:59 +01:00
bandwidth.sh changed bandwidth.sh 2015-10-12 22:46:45 +02:00
check_glue_records.sh added check_glue_records 2017-02-27 11:58:26 +01:00
droopy.py added scripts from other places 2012-05-14 11:40:45 +02:00
flash_scrolllock.sh added start_vmware and flash 2017-11-01 14:10:32 +01:00
htpasswd.py repo cleanup, moved alot of stuff to wiki 2013-04-11 23:38:05 +02:00
htpasswd.sh added htpasswd.sh 2021-09-13 13:20:05 +02:00
install_moka.sh added a script for installing the moka icon theme 2013-11-07 16:47:28 +01:00
install_yaourt.sh added more dependencies to yaourt install script 2013-10-24 16:14:58 +02:00
jekyll.sh added jekyll.sh 2021-05-30 12:28:46 +02:00
lifesaver.pl renamed lifesaver 2013-06-23 13:52:08 +02:00
linz_ag.pl added rm_follow_links.sh and linz_ag.pl 2013-03-28 08:36:59 +01:00
lomount.sh added lomount script for mounting partitions from within a diskdump 2012-09-10 10:52:15 +02:00
mc.sh added first version of minecraft server hosting tool 2018-01-10 15:51:23 +01:00
mcapi.sh added mcapi.sh 2021-09-03 13:59:47 +02:00
on_time.sh added various scripts (thinkpad, cisco) 2017-03-19 20:44:29 +01:00
power_control.sh added powercontrol.sh which is a wrapper script for hs100.sh from https://github.com/branning/hs100 2019-11-19 13:55:35 +01:00
prep_ubuntu_server.sh removed server tips package from ubuntu prep script 2014-12-26 12:12:55 +01:00
prime.pl added two perl learing scripts 2013-06-20 15:01:38 +02:00
recreate_ssh_host_keys.sh recreate ssh host keys 2013-06-23 13:41:55 +02:00
reference.pl added two perl learing scripts 2013-06-20 15:01:38 +02:00
remove_emailaddress_from_queue.pl added remove_emailadresses_from_queue.pl 2012-07-03 15:04:06 +02:00
request_certificate.sh added request_certificate.sh 2021-10-16 21:48:28 +02:00
restic_backup.sh fixed a bug where the password file and repo were given twice 2021-02-20 15:43:10 +01:00
rtspstream.pl put some scripts from prix.aec.at in there and moved vpnc_config.sh to archive 2012-06-14 15:02:00 +02:00
setup_zsh.sh working on zsh setup script 2018-05-13 23:09:32 +02:00
speedtest.sh added speedtest script 2019-09-06 00:21:58 +02:00
start_vmware.sh start_vmware 2017-11-26 13:24:57 +01:00
take_snapshot.sh added take_snapshot.sh 2021-10-16 21:12:00 +02:00
telnet_mail.sh moved mbots in here and renamed a couple of scripts to more speaking names 2012-06-14 23:16:09 +02:00

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.