I hereby claim:
- I am gavinelder on github.
- I am setsquared (https://keybase.io/setsquared) on keybase.
- I have a public key ASDhy1f5TZdrl4SOBNkizKeXnOAAuK2iyU45hfG-4hIOxAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
⇐ back to the gist-blog at jrw.fi
Backing stuff up is a bit of a hassle, to set up and to maintain. While full-blown backup suites such as duplicity or CrashPlan will do all kinds of clever things for you (and I'd recommend either for more complex setups), sometimes you just want to put that daily database dump somewhere off-site and be done with it. This is what I've done, with an Amazon S3 bucket and curl
. Hold onto your hats, there's some Bucket Policy acrobatics ahead.
There's also a tl;dr at the very end if you just want the delicious copy-pasta.
#!/bin/bash | |
# Source environment variables | |
source "$MICROMDM_ENV_PATH" | |
# Define API endpoints | |
devices_endpoint="v1/devices" | |
commands_endpoint="v1/commands" | |
# Function to validate OS version |