bakineggs (owner)

Revisions

gist: 170644 Download_button fork
public
Public Clone URL: git://gist.github.com/170644.git
Embed All Files: show embed
backup.sh #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
 
LOCAL_DIRECTORY='/Users/dan/backups/bakineggs.com'
REMOTE='lwweb:/www/bakineggs.com/'
 
if [ ! -d $LOCAL_DIRECTORY ]; then
mkdir -p $LOCAL_DIRECTORY
fi
 
cd $LOCAL_DIRECTORY
 
if [ ! -d '.git' ]; then
git init
fi
 
rsync -az --delete-before --exclude='.git' $REMOTE .
 
git add .
git commit -m "`date`"