Changeset 199 for bin/backup_db.sh
- Timestamp:
- Apr 27, 2009, 9:40:00 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
bin/backup_db.sh
r198 r199 3 3 . config.sh 4 4 5 echo Zaloha databa se...5 echo Zaloha databaze... 6 6 7 7 mkdir /tmp/backup 8 8 cd /tmp/backup 9 9 10 echo IS 10 DB_NAME=is 11 echo ${DB_NAME} 12 mysqldump --user=${DB_USER} --password=${DB_PASSWORD} ${DB_NAME} > ${DB_NAME}.sql 13 tar -c -z is.sql > ${DB_BACKUP_DIR}${DB_NAME}/${DB_NAME}_$(date +"%Y-%m-%d").tar.gz 14 unlink ${DB_NAME}.sql 11 15 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 16 DB_NAME=share 17 echo ${DB_NAME} 18 mysqldump --user=${DB_USER} --password=${DB_PASSWORD} ${DB_NAME} > ${DB_NAME}.sql 19 tar -c -z is.sql > ${DB_BACKUP_DIR}${DB_NAME}/${DB_NAME}_$(date +"%Y-%m-%d").tar.gz 20 unlink ${DB_NAME}.sql 25 21 26 22 rmdir /tmp/backup
Note:
See TracChangeset
for help on using the changeset viewer.