Created
October 16, 2014 09:37
-
-
Save furu/4b1e6eb3206741590c7e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
service tomcat7 stop | |
mkdir -p /var/backups/gitbucket | |
cd /var/lib | |
tar cfz /var/backups/gitbucket/gitbucket-`date +%Y%m%d`.tar.gz gitbucket | |
service tomcat7 start | |
cd /var/backups/gitbucket | |
find -type f -name "gitbucket-*.tar.gz" -mtime +2 -delete | |
# rsync やら nfs やらで他のサーバに転送するなり何なりする |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment