Skip to content

Commit

Permalink
backup script remove rsync
Browse files Browse the repository at this point in the history
  • Loading branch information
justb4 committed Jul 25, 2018
1 parent 6bf49ed commit 7ea2b18
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions platform/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,18 @@ done
echo "END backup databases op `date`" >> ${LOG_FILE}

# Now sync to backup server
RSYNC="rsync -e ssh -alzvx --delete "
BACKUP_HOST="vps68271@backup"

# Temporarily disable backup on SETEST to save space
if [ `hostname` == "SEPROD" ]
then
# We will have last 7 days always
${RSYNC} ${BACKUP_DIR}/ ${BACKUP_HOST}:`hostname`-weekday-${WEEK_DAY}/ >> ${LOG_FILE}

# At the start of each month we save the backup of the last day of previous month
${RSYNC} ${BACKUP_DIR}/ ${BACKUP_HOST}:`hostname`-${YEAR}-${MONTH}/ >> ${LOG_FILE}
fi
#RSYNC="rsync -e ssh -alzvx --delete "
#BACKUP_HOST="vps68271@backup"
#
## Temporarily disable backup on SETEST to save space
#if [ `hostname` == "SEPROD" ]
#then
# # We will have last 7 days always
# ${RSYNC} ${BACKUP_DIR}/ ${BACKUP_HOST}:`hostname`-weekday-${WEEK_DAY}/ >> ${LOG_FILE}
#
# # At the start of each month we save the backup of the last day of previous month
# ${RSYNC} ${BACKUP_DIR}/ ${BACKUP_HOST}:`hostname`-${YEAR}-${MONTH}/ >> ${LOG_FILE}
#fi

# To inspect from admin
cp ${LOG_FILE} ${BACKUP_DIR}

0 comments on commit 7ea2b18

Please sign in to comment.