Backup of bitbucket.
This commit is contained in:
@@ -2,6 +2,7 @@ CD=cd
|
|||||||
DATE=/bin/date
|
DATE=/bin/date
|
||||||
TAR=/bin/tar
|
TAR=/bin/tar
|
||||||
BZIP2=/bin/bzip2
|
BZIP2=/bin/bzip2
|
||||||
|
GIT=/usr/bin/git
|
||||||
GPG=/usr/bin/gpg
|
GPG=/usr/bin/gpg
|
||||||
PASS=/home/vahagn/.gnupg/backup-passphrase
|
PASS=/home/vahagn/.gnupg/backup-passphrase
|
||||||
SRC=/home/vahagn/git
|
SRC=/home/vahagn/git
|
||||||
@@ -26,10 +27,17 @@ SIGNATURE=$BACKUP_DIR/git.$TIMESTAMP.tar.bz2.sig
|
|||||||
echo Starting $LOG | tee -a $LOG
|
echo Starting $LOG | tee -a $LOG
|
||||||
echo start `$DATE` | 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 to git directory and then bzip2 all content and crypt it.
|
||||||
#
|
#
|
||||||
$CD $SRC
|
$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
|
# Remove old files
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user