Backup of bitbucket.
This commit is contained in:
@@ -2,6 +2,7 @@ CD=cd
|
||||
DATE=/bin/date
|
||||
TAR=/bin/tar
|
||||
BZIP2=/bin/bzip2
|
||||
GIT=/usr/bin/git
|
||||
GPG=/usr/bin/gpg
|
||||
PASS=/home/vahagn/.gnupg/backup-passphrase
|
||||
SRC=/home/vahagn/git
|
||||
@@ -26,10 +27,17 @@ SIGNATURE=$BACKUP_DIR/git.$TIMESTAMP.tar.bz2.sig
|
||||
echo Starting $LOG | tee -a $LOG
|
||||
echo start `$DATE` | tee -a $LOG
|
||||
#
|
||||
# Sync with BitBucket upstream repos.
|
||||
#
|
||||
$CD $SRC/scripts.git
|
||||
$GIT fetch
|
||||
$CD $SRC/test.git
|
||||
$GIT fetch
|
||||
#
|
||||
# cd to git directory and then bzip2 all content and crypt it.
|
||||
#
|
||||
$CD $SRC
|
||||
($TAR -cvp . | $BZIP2 -c | $GPG -c --passphrase-file $PASS --output $BACKUP) 2>&1| tee -a $LOG
|
||||
($TAR -cvp . | $BZIP2 -c | $GPG -c --passphrase-file $PASS --output $BACKUP --batch --quiet ) 2>&1| tee -a $LOG
|
||||
#
|
||||
# Remove old files
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user