Skip to content

Instantly share code, notes, and snippets.

View knhsll's full-sized avatar
🦊
What does the fox say?

Sven K. knhsll

🦊
What does the fox say?
  • BWI GmbH
  • Kaiserslautern
View GitHub Profile
@knhsll
knhsll / oc_backup.sh
Created June 4, 2017 10:02 — forked from nblumoe/oc_backup.sh
ownCloud backup script
#!/bin/bash
# database
mysqldump --lock-tables -h localhost -u owncloud -p owncloud > owncloud-sqlbkp_`date +"%Y%m%d"`.bak
# directory
rsync -Aax /var/www/owncloud/ owncloud-dirbkp_`date +"%Y%m%d"`/
#!/bin/bash
# Shamelessly stolen from https://gist.github.com/eduardocardoso/82a629882ddb02ab3677
set -o errexit
echo "Removing exited docker containers..."
docker ps -a -f status=exited -q | xargs -r docker rm -v
echo "Removing untagged images..."
docker images --no-trunc | grep "<none>" | awk '{print $3}' | xargs -r docker rmi

Keybase proof

I hereby claim:

  • I am sknohsalla on github.
  • I am svenknhsll (https://keybase.io/svenknhsll) on keybase.
  • I have a public key whose fingerprint is 82C7 C700 8088 F170 55D6 6498 576A 76A1 F19E 871A

To claim this, I am signing this object: