Changeset 539 for bin/backup_db.sh


Ignore:
Timestamp:
May 26, 2013, 10:23:53 PM (11 years ago)
Author:
chronos
Message:
  • Aktualizace skriptů
File:
1 edited

Legend:

Unmodified
Added
Removed
  • bin/backup_db.sh

    r200 r539  
    11#!/bin/sh
    22
    3 . config.sh
     3. ./config.sh
     4
     5echo ${DB_BACKUP_DIR}
    46
    57echo Zaloha databaze...
     
    2628unlink ${DB_NAME}.sql
    2729
     30DB_NAME=www
     31echo ${DB_NAME}
     32mysqldump --user=${DB_USER} --password=${DB_PASSWORD} ${DB_NAME} > ${DB_NAME}.sql
     33tar -c -z ${DB_NAME}.sql > ${DB_BACKUP_DIR}${DB_NAME}/${DB_NAME}_$(date +"%Y-%m-%d").tar.gz
     34unlink ${DB_NAME}.sql
     35
     36DB_NAME=jirihajda
     37echo ${DB_NAME}
     38mysqldump --user=${DB_USER} --password=${DB_PASSWORD} ${DB_NAME} > ${DB_NAME}.sql
     39tar -c -z ${DB_NAME}.sql > ${DB_BACKUP_DIR}${DB_NAME}/${DB_NAME}_$(date +"%Y-%m-%d").tar.gz
     40unlink ${DB_NAME}.sql
     41
     42DB_NAME=sunrisechat
     43echo ${DB_NAME}
     44mysqldump --user=${DB_USER} --password=${DB_PASSWORD} ${DB_NAME} > ${DB_NAME}.sql
     45tar -c -z ${DB_NAME}.sql > ${DB_BACKUP_DIR}${DB_NAME}/${DB_NAME}_$(date +"%Y-%m-%d").tar.gz
     46unlink ${DB_NAME}.sql
     47
    2848rmdir /tmp/backup
    2949
Note: See TracChangeset for help on using the changeset viewer.