Skip to content

Instantly share code, notes, and snippets.

View WhaleJ84's full-sized avatar
😠
sudo !!

James Whale WhaleJ84

😠
sudo !!
  • UK
View GitHub Profile
@WhaleJ84
WhaleJ84 / netbox_backup.sh
Created December 1, 2021 22:03
A shell script to automatically backup persistent Netbox data, encrypt them with a recipients GPG key and email the files with a SHA256 hash of the attachments.
#!/bin/sh
# #
# A modified backup script based off the official documentation #
# https://netbox.readthedocs.io/en/stable/ #
# #
# Consider adding this to your crontab with something like: #
# 0 18 * * 0 /path/to/netbox_backup.sh email@example.com #
# #
set -e