Guest User

Untitled

a guest
Jan 23rd, 2018
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3.  
  4. #A script to backup all the git repositories managed by gitosis
  5. #and create a date stamped tarball.
  6. #Pradeep Gowda
  7. #2011-08-19
  8.  
  9.  
  10. GITOSISADMIN=$HOME/mycompany/gitosis-admin
  11. GITSERVER="git@gitserver.mycompany.com"
  12. TODAY=`date +%Y-%m-%d`
  13.  
  14. mkdir gitbackups-$TODAY
  15. grep ^writable $GITOSISADMIN/gitosis.conf | cut -d= -f 2 | tr "\\n" " " | tr " " "\\n" | sort | uniq | xargs -I {} git clone $GITSERVER:{}.git gitbackups-$TODAY/{}
  16. tar czf gitbackups-$TODAY.tgz gitbackups-$TODAY
Add Comment
Please, Sign In to add comment