This tutorial shows how to make backups to Google Cloud Storage. The backups are:
- automatic
- stored off site
- incremental
if [ ! -f $1 ] | |
then | |
echo "please provide a file in arg" | |
exit -1 | |
fi | |
#assign folder to upload | |
if [ -z "$2" ] | |
then | |
folderid="root" |
#!/bin/bash | |
####################################################################### | |
# This is a helper script that keeps snapraid parity info in sync with | |
# your data and optionally verifies the parity info. Here's how it works: | |
# 1) Checks for size 0 .nzb files (plex) | |
# 2) Calls diff to figure out if the parity info is out of sync. | |
# 3) If parity info is out of sync, AND the number of deleted or changed files exceed | |
# X (each configurable), it triggers an alert email and stops. (In case of | |
# accidental deletions, you have the opportunity to recover them from |
Ref: https://gist.github.com/rnwolf/e09ae9ad6d3ac759767d129d52cab1f1
Key Binding | Description |
---|---|
SPC | < space > |
RET | < return > |
C | < ctrl > |
M | < alt >, M stands for Meta |
#!/usr/bin/env python3 | |
import sys | |
import subprocess | |
import re | |
def containers(): | |
lxcOutput = subprocess.check_output( ['lxc', 'list' ] ) | |
ips = re.compile( '\d+\.\d+\.\d+\.\d+' ).findall( str( lxcOutput ) ) | |
nodes = dict( hosts = ips, vars = { "ansible_user": "root" } ) | |
inventory = dict( nodes = nodes ) |