Changeset 539 for bin/backup_db.sh
- Timestamp:
- May 26, 2013, 10:23:53 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
bin/backup_db.sh
r200 r539 1 1 #!/bin/sh 2 2 3 . config.sh 3 . ./config.sh 4 5 echo ${DB_BACKUP_DIR} 4 6 5 7 echo Zaloha databaze... … … 26 28 unlink ${DB_NAME}.sql 27 29 30 DB_NAME=www 31 echo ${DB_NAME} 32 mysqldump --user=${DB_USER} --password=${DB_PASSWORD} ${DB_NAME} > ${DB_NAME}.sql 33 tar -c -z ${DB_NAME}.sql > ${DB_BACKUP_DIR}${DB_NAME}/${DB_NAME}_$(date +"%Y-%m-%d").tar.gz 34 unlink ${DB_NAME}.sql 35 36 DB_NAME=jirihajda 37 echo ${DB_NAME} 38 mysqldump --user=${DB_USER} --password=${DB_PASSWORD} ${DB_NAME} > ${DB_NAME}.sql 39 tar -c -z ${DB_NAME}.sql > ${DB_BACKUP_DIR}${DB_NAME}/${DB_NAME}_$(date +"%Y-%m-%d").tar.gz 40 unlink ${DB_NAME}.sql 41 42 DB_NAME=sunrisechat 43 echo ${DB_NAME} 44 mysqldump --user=${DB_USER} --password=${DB_PASSWORD} ${DB_NAME} > ${DB_NAME}.sql 45 tar -c -z ${DB_NAME}.sql > ${DB_BACKUP_DIR}${DB_NAME}/${DB_NAME}_$(date +"%Y-%m-%d").tar.gz 46 unlink ${DB_NAME}.sql 47 28 48 rmdir /tmp/backup 29 49
Note:
See TracChangeset
for help on using the changeset viewer.