|
1 week ago | |
---|---|---|
archive | 7 years ago | |
cisco_snippets | 2 years ago | |
clonebackup | 8 years ago | |
db | 7 years ago | |
ftpsftp | 7 years ago | |
kvm-tools | 7 years ago | |
monitoring | 4 months ago | |
thinkpad_x131e | 4 years ago | |
vmware | 8 months ago | |
LICENSE | 5 months ago | |
README.md | 2 weeks ago | |
bandwidth.sh | 5 years ago | |
check_glue_records.sh | 4 years ago | |
droopy.py | 8 years ago | |
flash_scrolllock.sh | 3 years ago | |
htpasswd.py | 8 years ago | |
install_moka.sh | 7 years ago | |
install_yaourt.sh | 7 years ago | |
lifesaver.pl | 7 years ago | |
linz_ag.pl | 8 years ago | |
lomount.sh | 8 years ago | |
mc.sh | 3 years ago | |
on_time.sh | 4 years ago | |
power_control.sh | 1 year ago | |
prep_ubuntu_server.sh | 6 years ago | |
prime.pl | 7 years ago | |
recreate_ssh_host_keys.sh | 7 years ago | |
reference.pl | 7 years ago | |
remove_emailaddress_from_queue.pl | 8 years ago | |
restic_backup.sh | 1 week ago | |
rtspstream.pl | 8 years ago | |
setup_zsh.sh | 2 years ago | |
speedtest.sh | 1 year ago | |
start_vmware.sh | 3 years ago | |
telnet_mail.sh | 8 years ago |
My personal collection of handy scripts. mostly bash.
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! :-)
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.