Changeset 199 for bin/backup_db.sh


Ignore:
Timestamp:
Apr 27, 2009, 9:40:00 AM (16 years ago)
Author:
george
Message:
  • Upraveno: Zpřehlednění zálohovacího skriptu databáze.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • bin/backup_db.sh

    r198 r199  
    33. config.sh
    44
    5 echo Zaloha database...
     5echo Zaloha databaze...
    66
    77mkdir /tmp/backup
    88cd /tmp/backup
    99
    10 echo IS
     10DB_NAME=is
     11echo ${DB_NAME}
     12mysqldump --user=${DB_USER} --password=${DB_PASSWORD} ${DB_NAME} > ${DB_NAME}.sql
     13tar -c -z is.sql > ${DB_BACKUP_DIR}${DB_NAME}/${DB_NAME}_$(date +"%Y-%m-%d").tar.gz
     14unlink ${DB_NAME}.sql
    1115
    12 mysqldump --user=${DB_USER} --password=${DB_PASSWORD} centrala > is.sql
    13 
    14 tar -c -z is.sql > ${DB_BACKUP_DIR}centrala/is_$(date +"%Y-%m-%d").tar.gz
    15 
    16 unlink is.sql
    17 
    18 echo Share
    19 
    20 mysqldump --user=${DB_USER} --password=${DB_PASSWORD} --opt share > share.sql
    21 
    22 tar -c -z share.sql > ${DB_BACKUP_DIR}share/share_$(date +"%Y-%m-%d").tar.gz
    23 
    24 unlink share.sql
     16DB_NAME=share
     17echo ${DB_NAME}
     18mysqldump --user=${DB_USER} --password=${DB_PASSWORD} ${DB_NAME} > ${DB_NAME}.sql
     19tar -c -z is.sql > ${DB_BACKUP_DIR}${DB_NAME}/${DB_NAME}_$(date +"%Y-%m-%d").tar.gz
     20unlink ${DB_NAME}.sql
    2521
    2622rmdir /tmp/backup
Note: See TracChangeset for help on using the changeset viewer.