david 89e5a2a948 | ||
---|---|---|
archive | ||
cisco_snippets | ||
clonebackup | ||
db | ||
ftpsftp | ||
kvm-tools | ||
monitoring | ||
thinkpad_x131e | ||
vmware | ||
LICENSE | ||
README.md | ||
bandwidth.sh | ||
check_glue_records.sh | ||
droopy.py | ||
flash_scrolllock.sh | ||
htpasswd.py | ||
htpasswd.sh | ||
install_moka.sh | ||
install_yaourt.sh | ||
jekyll.sh | ||
lifesaver.pl | ||
linz_ag.pl | ||
lomount.sh | ||
mc.sh | ||
mcapi.sh | ||
on_time.sh | ||
power_control.sh | ||
prep_ubuntu_server.sh | ||
prime.pl | ||
recreate_ssh_host_keys.sh | ||
reference.pl | ||
remove_emailaddress_from_queue.pl | ||
restic_backup.sh | ||
rtspstream.pl | ||
setup_zsh.sh | ||
speedtest.sh | ||
start_vmware.sh | ||
telnet_mail.sh |
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.