Skip to content

Instantly share code, notes, and snippets.

@nblumoe
Created June 7, 2015 08:47
Show Gist options
  • Save nblumoe/a3dfaa9e140b67d8673e to your computer and use it in GitHub Desktop.
Save nblumoe/a3dfaa9e140b67d8673e to your computer and use it in GitHub Desktop.
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"`/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment